/multimedia/pyjama/

dexon-sol-tools' title='dexon-sol-tools Git repository'/>
aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-19 23:48:06 +0800
committerFabio Berger <me@fabioberger.com>2018-07-19 23:48:06 +0800
commitd8898cf9a30cc349868afcf2b78e6369e57aa726 (patch)
treef96d1aa76c7e5aa9e3311d5cdbd0d31c8ec8d7fb /packages
parent1aaf633df883f62fad890b2d87a2dc89067821c5 (diff)
parent3de88d5345c7a4549bc69e2ca28f0601f5d42189 (diff)
downloaddexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.gz
dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.zst
dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.zip
merge v2-prototype
Diffstat (limited to 'packages')
-rw-r--r--packages/0x.js/CHANGELOG.json53
-rw-r--r--packages/0x.js/CHANGELOG.md4
-rw-r--r--packages/0x.js/package.json43
-rw-r--r--packages/0x.js/src/0x.ts115
-rw-r--r--packages/0x.js/src/artifacts.ts7
-rw-r--r--packages/0x.js/src/artifacts/ZRXToken.json10031
-rw-r--r--packages/0x.js/src/compact_artifacts/DummyToken.json22
-rw-r--r--packages/0x.js/src/compact_artifacts/EtherToken.json287
-rw-r--r--packages/0x.js/src/compact_artifacts/Exchange.json610
-rw-r--r--packages/0x.js/src/compact_artifacts/Token.json172
-rw-r--r--packages/0x.js/src/compact_artifacts/TokenRegistry.json547
-rw-r--r--packages/0x.js/src/compact_artifacts/TokenTransferProxy.json187
-rw-r--r--packages/0x.js/src/compact_artifacts/ZRX.json20
-rw-r--r--packages/0x.js/src/index.ts59
-rw-r--r--packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts8
-rw-r--r--packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts4
-rw-r--r--packages/0x.js/test/0x.js_test.ts74
-rw-r--r--packages/0x.js/test/artifacts_test.ts48
-rw-r--r--packages/0x.js/test/global_hooks.ts8
-rw-r--r--packages/0x.js/test/utils/token_utils.ts39
-rw-r--r--packages/0x.js/test/utils/web3_wrapper.ts10
-rw-r--r--packages/abi-gen/CHANGELOG.json13
-rw-r--r--packages/abi-gen/CHANGELOG.md4
-rwxr-xr-xpackages/abi-gen/bin/abi-gen.js2
-rw-r--r--packages/abi-gen/coverage/.gitkeep0
-rw-r--r--packages/abi-gen/package.json24
-rw-r--r--packages/abi-gen/src/index.ts26
-rw-r--r--packages/abi-gen/src/utils.ts24
-rw-r--r--packages/abi-gen/test/utils_test.ts86
-rw-r--r--packages/assert/CHANGELOG.json9
-rw-r--r--packages/assert/CHANGELOG.md4
-rw-r--r--packages/assert/package.json6
-rw-r--r--packages/assert/src/index.ts32
-rw-r--r--packages/assert/test/assert_test.ts2
-rw-r--r--packages/base-contract/CHANGELOG.json9
-rw-r--r--packages/base-contract/CHANGELOG.md4
-rw-r--r--packages/base-contract/package.json10
-rw-r--r--packages/base-contract/src/index.ts12
-rw-r--r--packages/connect/CHANGELOG.json18
-rw-r--r--packages/connect/CHANGELOG.md4
-rw-r--r--packages/connect/package.json17
-rw-r--r--packages/connect/src/http_client.ts6
-rw-r--r--packages/connect/src/index.ts3
-rw-r--r--packages/connect/src/orderbook_channel_factory.ts32
-rw-r--r--packages/connect/src/schemas/schemas.ts2
-rw-r--r--packages/connect/src/schemas/websocket_orderbook_channel_config_schema.ts10
-rw-r--r--packages/connect/src/types.ts13
-rw-r--r--packages/connect/src/utils/assert.ts26
-rw-r--r--packages/connect/src/utils/orderbook_channel_message_parser.ts8
-rw-r--r--packages/connect/src/utils/type_converters.ts6
-rw-r--r--packages/connect/src/ws_orderbook_channel.ts185
-rw-r--r--packages/connect/test/orderbook_channel_factory_test.ts45
-rw-r--r--packages/connect/test/ws_orderbook_channel_test.ts60
-rw-r--r--packages/contract-wrappers/CHANGELOG.json9
-rw-r--r--packages/contract-wrappers/CHANGELOG.md4
-rw-r--r--packages/contract-wrappers/package.json26
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts36
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts3
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts23
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts3
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts10
-rw-r--r--packages/contract-wrappers/src/index.ts14
-rw-r--r--packages/contract-wrappers/src/schemas/contract_wrappers_private_network_config_schema.ts8
-rw-r--r--packages/contract-wrappers/src/schemas/contract_wrappers_public_network_config_schema.ts4
-rw-r--r--packages/contract-wrappers/src/utils/assert.ts2
-rw-r--r--packages/contract-wrappers/test/erc20_wrapper_test.ts3
-rw-r--r--packages/contract-wrappers/test/erc721_wrapper_test.ts3
-rw-r--r--packages/contract-wrappers/test/ether_token_wrapper_test.ts14
-rw-r--r--packages/contract-wrappers/test/exchange_wrapper_test.ts14
-rw-r--r--packages/contract-wrappers/test/global_hooks.ts2
-rw-r--r--packages/contract-wrappers/test/subscription_test.ts38
-rw-r--r--packages/contracts/compiler.json1
-rw-r--r--packages/contracts/package.json22
-rw-r--r--packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol4
-rw-r--r--packages/contracts/src/2.0.0/forwarder/Forwarder.sol1
-rw-r--r--packages/contracts/src/2.0.0/protocol/AssetProxyOwner/AssetProxyOwner.sol27
-rw-r--r--packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol16
-rw-r--r--packages/contracts/src/2.0.0/protocol/Exchange/MixinWrapperFunctions.sol16
-rw-r--r--packages/contracts/src/2.0.0/protocol/Exchange/interfaces/IWrapperFunctions.sol8
-rw-r--r--packages/contracts/src/2.0.0/test/TestAssetProxyOwner/TestAssetProxyOwner.sol23
-rw-r--r--packages/contracts/src/2.0.0/utils/LibBytes/LibBytes.sol3
-rw-r--r--packages/contracts/src/2.0.0/utils/SafeMath/SafeMath.sol18
-rw-r--r--packages/contracts/test/asset_proxy/proxies.ts37
-rw-r--r--packages/contracts/test/exchange/core.ts194
-rw-r--r--packages/contracts/test/exchange/dispatcher.ts6
-rw-r--r--packages/contracts/test/exchange/libs.ts8
-rw-r--r--packages/contracts/test/exchange/match_orders.ts180
-rw-r--r--packages/contracts/test/exchange/signature_validator.ts8
-rw-r--r--packages/contracts/test/exchange/transactions.ts20
-rw-r--r--packages/contracts/test/exchange/wrapper.ts274
-rw-r--r--packages/contracts/test/forwarder/forwarder.ts107
-rw-r--r--packages/contracts/test/libraries/lib_bytes.ts11
-rw-r--r--packages/contracts/test/multisig/asset_proxy_owner.ts26
-rw-r--r--packages/contracts/test/multisig/multi_sig_with_time_lock.ts2
-rw-r--r--packages/contracts/test/utils/asset_wrapper.ts20
-rw-r--r--packages/contracts/test/utils/block_timestamp.ts (renamed from packages/contracts/test/utils/increase_time.ts)9
-rw-r--r--packages/contracts/test/utils/constants.ts5
-rw-r--r--packages/contracts/test/utils/core_combinatorial_utils.ts8
-rw-r--r--packages/contracts/test/utils/erc20_wrapper.ts14
-rw-r--r--packages/contracts/test/utils/erc721_wrapper.ts10
-rw-r--r--packages/contracts/test/utils/exchange_wrapper.ts10
-rw-r--r--packages/contracts/test/utils/forwarder_wrapper.ts18
-rw-r--r--packages/contracts/test/utils/log_decoder.ts6
-rw-r--r--packages/contracts/test/utils/match_order_tester.ts22
-rw-r--r--packages/contracts/test/utils/multi_sig_wrapper.ts13
-rw-r--r--packages/contracts/test/utils/order_factory.ts15
-rw-r--r--packages/contracts/test/utils/order_factory_from_scenario.ts36
-rw-r--r--packages/contracts/test/utils/simple_asset_balance_and_proxy_allowance_fetcher.ts2
-rw-r--r--packages/contracts/test/utils/simple_order_filled_cancelled_fetcher.ts4
-rw-r--r--packages/contracts/test/utils/token_registry_wrapper.ts4
-rw-r--r--packages/contracts/test/utils/transaction_factory.ts6
-rw-r--r--packages/contracts/test/utils/type_encoding_utils.ts21
-rw-r--r--packages/contracts/test/utils/web3_wrapper.ts6
-rw-r--r--packages/dev-utils/CHANGELOG.json9
-rw-r--r--packages/dev-utils/CHANGELOG.md4
-rw-r--r--packages/dev-utils/package.json15
-rw-r--r--packages/dev-utils/src/blockchain_lifecycle.ts43
-rw-r--r--packages/dev-utils/src/web3_factory.ts21
-rw-r--r--packages/ethereum-types/package.json2
-rw-r--r--packages/fill-scenarios/CHANGELOG.json9
-rw-r--r--packages/fill-scenarios/CHANGELOG.md4
-rw-r--r--packages/fill-scenarios/package.json18
-rw-r--r--packages/fill-scenarios/src/artifacts.ts6
-rw-r--r--packages/fill-scenarios/src/constants.ts1
-rw-r--r--packages/fill-scenarios/src/fill_scenarios.ts300
-rw-r--r--packages/fill-scenarios/src/index.ts223
-rw-r--r--packages/json-schemas/CHANGELOG.json13
-rw-r--r--packages/json-schemas/CHANGELOG.md4
-rw-r--r--packages/json-schemas/package.json6
-rw-r--r--packages/json-schemas/schemas/call_data_schema.ts2
-rw-r--r--packages/json-schemas/src/schema_validator.ts2
-rw-r--r--packages/metacoin/package.json25
-rw-r--r--packages/metacoin/test/utils/web3_wrapper.ts8
-rw-r--r--packages/migrations/CHANGELOG.json9
-rw-r--r--packages/migrations/CHANGELOG.md4
-rw-r--r--packages/migrations/artifacts/2.0.0/AssetProxyOwner.json43828
-rw-r--r--packages/migrations/artifacts/2.0.0/DummyERC20Token.json46
-rw-r--r--packages/migrations/artifacts/2.0.0/DummyERC721Receiver.json14
-rw-r--r--packages/migrations/artifacts/2.0.0/DummyERC721Token.json42
-rw-r--r--packages/migrations/artifacts/2.0.0/ERC20Proxy.json42
-rw-r--r--packages/migrations/artifacts/2.0.0/ERC20Token.json22
-rw-r--r--packages/migrations/artifacts/2.0.0/ERC721Proxy.json42
-rw-r--r--packages/migrations/artifacts/2.0.0/ERC721Token.json30
-rw-r--r--packages/migrations/artifacts/2.0.0/Exchange.json159
-rw-r--r--packages/migrations/artifacts/2.0.0/ExchangeWrapper.json38
-rw-r--r--packages/migrations/artifacts/2.0.0/Forwarder.json341
-rw-r--r--packages/migrations/artifacts/2.0.0/IAssetData.json4
-rw-r--r--packages/migrations/artifacts/2.0.0/IAssetProxy.json8
-rw-r--r--packages/migrations/artifacts/2.0.0/IValidator.json6
-rw-r--r--packages/migrations/artifacts/2.0.0/IWallet.json6
-rw-r--r--packages/migrations/artifacts/2.0.0/MixinAuthorizable.json34
-rw-r--r--packages/migrations/artifacts/2.0.0/MultiSigWallet.json18
-rw-r--r--packages/migrations/artifacts/2.0.0/MultiSigWalletWithTimeLock.json22
-rw-r--r--packages/migrations/artifacts/2.0.0/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.json723
-rw-r--r--packages/migrations/artifacts/2.0.0/TestAssetProxyDispatcher.json32
-rw-r--r--packages/migrations/artifacts/2.0.0/TestAssetProxyOwner.json47499
-rw-r--r--packages/migrations/artifacts/2.0.0/TestLibBytes.json22
-rw-r--r--packages/migrations/artifacts/2.0.0/TestLibs.json26
-rw-r--r--packages/migrations/artifacts/2.0.0/TestSignatureValidator.json38
-rw-r--r--packages/migrations/artifacts/2.0.0/TestValidator.json22
-rw-r--r--packages/migrations/artifacts/2.0.0/TestWallet.json26
-rw-r--r--packages/migrations/artifacts/2.0.0/TokenRegistry.json16
-rw-r--r--packages/migrations/artifacts/2.0.0/WETH9.json18
-rw-r--r--packages/migrations/artifacts/2.0.0/Whitelist.json42
-rw-r--r--packages/migrations/artifacts/2.0.0/ZRXToken.json9785
-rw-r--r--packages/migrations/compiler.json2
-rw-r--r--packages/migrations/package.json23
-rw-r--r--packages/migrations/src/2.0.0/migration.ts18
-rw-r--r--packages/migrations/src/utils/artifact_writer.ts4
-rw-r--r--packages/migrations/src/utils/provider_factory.ts12
-rw-r--r--packages/monorepo-scripts/package.json7
-rw-r--r--packages/monorepo-scripts/src/constants.ts2
-rw-r--r--packages/monorepo-scripts/src/find_unused_dependencies.ts11
-rw-r--r--packages/monorepo-scripts/src/globals.d.ts19
-rw-r--r--packages/monorepo-scripts/src/postpublish_utils.ts21
-rw-r--r--packages/monorepo-scripts/src/prepublish_checks.ts43
-rw-r--r--packages/monorepo-scripts/src/publish.ts35
-rw-r--r--packages/monorepo-scripts/src/test_installation.ts16
-rw-r--r--packages/monorepo-scripts/src/types.ts14
-rw-r--r--packages/monorepo-scripts/src/utils/changelog_utils.ts8
-rw-r--r--packages/monorepo-scripts/src/utils/utils.ts52
-rw-r--r--packages/order-utils/CHANGELOG.json13
-rw-r--r--packages/order-utils/CHANGELOG.md4
-rw-r--r--packages/order-utils/package.json15
-rw-r--r--packages/order-utils/src/abstract/abstract_order_filled_cancelled_lazy_store.ts12
-rw-r--r--packages/order-utils/src/assert.ts2
-rw-r--r--packages/order-utils/src/asset_data_utils.ts (renamed from packages/order-utils/src/asset_proxy_utils.ts)112
-rw-r--r--packages/order-utils/src/constants.ts1
-rw-r--r--packages/order-utils/src/crypto.ts2
-rw-r--r--packages/order-utils/src/exchange_transfer_simulator.ts2
-rw-r--r--packages/order-utils/src/index.ts3
-rw-r--r--packages/order-utils/src/order_state_utils.ts4
-rw-r--r--packages/order-utils/src/order_validation_utils.ts2
-rw-r--r--packages/order-utils/src/remaining_fillable_calculator.ts14
-rw-r--r--packages/order-utils/src/signature_utils.ts20
-rw-r--r--packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts18
-rw-r--r--packages/order-utils/src/store/order_filled_cancelled_lazy_store.ts65
-rw-r--r--packages/order-utils/test/exchange_transfer_simulator_test.ts9
-rw-r--r--packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts4
-rw-r--r--packages/order-watcher/CHANGELOG.json17
-rw-r--r--packages/order-watcher/CHANGELOG.md4
-rw-r--r--packages/order-watcher/package.json32
-rw-r--r--packages/order-watcher/src/artifacts.ts19
-rw-r--r--packages/order-watcher/src/compact_artifacts/DummyToken.json22
-rw-r--r--packages/order-watcher/src/compact_artifacts/ERC20Token.json49
-rw-r--r--packages/order-watcher/src/compact_artifacts/ERC721Token.json71
-rw-r--r--packages/order-watcher/src/compact_artifacts/EtherToken.json287
-rw-r--r--packages/order-watcher/src/compact_artifacts/Exchange.json543
-rw-r--r--packages/order-watcher/src/compact_artifacts/Token.json172
-rw-r--r--packages/order-watcher/src/compact_artifacts/TokenRegistry.json547
-rw-r--r--packages/order-watcher/src/compact_artifacts/TokenTransferProxy.json187
-rw-r--r--packages/order-watcher/src/compact_artifacts/WETH9.json100
-rw-r--r--packages/order-watcher/src/compact_artifacts/ZRX.json20
-rw-r--r--packages/order-watcher/src/fetchers/asset_balance_and_proxy_allowance_fetcher.ts74
-rw-r--r--packages/order-watcher/src/fetchers/order_filled_cancelled_fetcher.ts27
-rw-r--r--packages/order-watcher/src/index.ts3
-rw-r--r--packages/order-watcher/src/order_watcher/collision_resistant_abi_decoder.ts54
-rw-r--r--packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts230
-rw-r--r--packages/order-watcher/src/order_watcher/event_watcher.ts26
-rw-r--r--packages/order-watcher/src/order_watcher/expiration_watcher.ts14
-rw-r--r--packages/order-watcher/src/order_watcher/order_watcher.ts427
-rw-r--r--packages/order-watcher/src/schemas/order_watcher_partial_config_schema.ts13
-rw-r--r--packages/order-watcher/src/types.ts16
-rw-r--r--packages/order-watcher/src/utils/assert.ts16
-rw-r--r--packages/order-watcher/test/expiration_watcher_test.ts110
-rw-r--r--packages/order-watcher/test/global_hooks.ts8
-rw-r--r--packages/order-watcher/test/order_watcher_test.ts525
-rw-r--r--packages/order-watcher/test/utils/token_utils.ts2
-rw-r--r--packages/order-watcher/test/utils/web3_wrapper.ts2
-rw-r--r--packages/order-watcher/tslint.json3
-rw-r--r--packages/react-docs-example/package.json4
-rw-r--r--packages/react-docs/CHANGELOG.json12
-rw-r--r--packages/react-docs/CHANGELOG.md4
-rw-r--r--packages/react-docs/package.json8
-rw-r--r--packages/react-docs/src/docs_info.ts2
-rw-r--r--packages/react-docs/src/utils/doxity_utils.ts22
-rw-r--r--packages/react-docs/src/utils/typedoc_utils.ts2
-rw-r--r--packages/react-shared/CHANGELOG.json9
-rw-r--r--packages/react-shared/CHANGELOG.md4
-rw-r--r--packages/react-shared/package.json4
-rw-r--r--packages/react-shared/src/components/nested_sidebar_menu.tsx2
-rw-r--r--packages/sol-compiler/CHANGELOG.json9
-rw-r--r--packages/sol-compiler/CHANGELOG.md4
-rw-r--r--packages/sol-compiler/package.json15
-rw-r--r--packages/sol-compiler/src/compiler.ts19
-rw-r--r--packages/sol-compiler/test/compiler_test.ts2
-rw-r--r--packages/sol-cov/CHANGELOG.json9
-rw-r--r--packages/sol-cov/CHANGELOG.md4
-rw-r--r--packages/sol-cov/package.json16
-rw-r--r--packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts4
-rw-r--r--packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts4
-rw-r--r--packages/sol-cov/src/ast_visitor.ts14
-rw-r--r--packages/sol-cov/src/coverage_subprovider.ts2
-rw-r--r--packages/sol-cov/src/get_source_range_snippet.ts2
-rw-r--r--packages/sol-cov/src/profiler_subprovider.ts2
-rw-r--r--packages/sol-cov/src/revert_trace_subprovider.ts4
-rw-r--r--packages/sol-cov/src/trace_collection_subprovider.ts6
-rw-r--r--packages/sol-cov/src/trace_collector.ts8
-rw-r--r--packages/sol-resolver/package.json2
-rw-r--r--packages/sol-resolver/src/resolvers/fallthrough_resolver.ts2
-rw-r--r--packages/sol-resolver/src/resolvers/name_resolver.ts2
-rw-r--r--packages/sol-resolver/src/resolvers/npm_resolver.ts2
-rw-r--r--packages/sol-resolver/src/resolvers/relative_fs_resolver.ts2
-rw-r--r--packages/sra-report/CHANGELOG.json9
-rw-r--r--packages/sra-report/CHANGELOG.md4
-rw-r--r--packages/sra-report/package.json14
-rw-r--r--packages/subproviders/CHANGELOG.json12
-rw-r--r--packages/subproviders/CHANGELOG.md4
-rw-r--r--packages/subproviders/package.json13
-rw-r--r--packages/subproviders/src/index.ts2
-rw-r--r--packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts4
-rw-r--r--packages/subproviders/src/subproviders/fake_gas_estimate_subprovider.ts2
-rw-r--r--packages/subproviders/src/subproviders/ganache.ts2
-rw-r--r--packages/subproviders/src/subproviders/ledger.ts12
-rw-r--r--packages/subproviders/src/subproviders/mnemonic_wallet.ts4
-rw-r--r--packages/subproviders/src/subproviders/nonce_tracker.ts2
-rw-r--r--packages/subproviders/src/subproviders/private_key_wallet.ts4
-rw-r--r--packages/subproviders/src/subproviders/redundant_subprovider.ts2
-rw-r--r--packages/subproviders/src/subproviders/rpc_subprovider.ts90
-rw-r--r--packages/subproviders/src/subproviders/signer.ts2
-rw-r--r--packages/subproviders/src/subproviders/subprovider.ts24
-rw-r--r--packages/subproviders/src/utils/subprovider_utils.ts4
-rw-r--r--packages/subproviders/src/utils/wallet_utils.ts4
-rw-r--r--packages/subproviders/test/integration/ledger_subprovider_test.ts10
-rw-r--r--packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts3
-rw-r--r--packages/subproviders/test/unit/ledger_subprovider_test.ts5
-rw-r--r--packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts3
-rw-r--r--packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts27
-rw-r--r--packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts3
-rw-r--r--packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts8
-rw-r--r--packages/subproviders/tsconfig.json3
-rw-r--r--packages/testnet-faucets/package.json17
-rw-r--r--packages/testnet-faucets/src/ts/dispatch_queue.ts4
-rw-r--r--packages/testnet-faucets/src/ts/error_reporter.ts4
-rw-r--r--packages/testnet-faucets/src/ts/handler.ts19
-rw-r--r--packages/testnet-faucets/src/ts/server.ts24
-rw-r--r--packages/tslint-config/package.json2
-rw-r--r--packages/tslint-config/rules/customNoMagicNumbersRule.ts1
-rw-r--r--packages/tslint-config/tslint.json75
-rw-r--r--packages/types/package.json2
-rw-r--r--packages/types/src/index.ts8
-rw-r--r--packages/typescript-typings/CHANGELOG.json15
-rw-r--r--packages/typescript-typings/CHANGELOG.md4
-rw-r--r--packages/typescript-typings/package.json2
-rw-r--r--packages/typescript-typings/types/detect-node/index.d.ts3
-rw-r--r--packages/typescript-typings/types/ethereumjs-abi/index.d.ts7
-rw-r--r--packages/typescript-typings/types/json-rpc-error/index.d.ts8
-rw-r--r--packages/typescript-typings/types/lerna-get-packages/index.d.ts16
-rw-r--r--packages/utils/CHANGELOG.json9
-rw-r--r--packages/utils/CHANGELOG.md4
-rw-r--r--packages/utils/package.json11
-rw-r--r--packages/utils/src/abi_decoder.ts2
-rw-r--r--packages/utils/src/abi_utils.ts6
-rw-r--r--packages/utils/src/fetchAsync.ts37
-rw-r--r--packages/utils/src/index.ts1
-rw-r--r--packages/web3-wrapper/CHANGELOG.json9
-rw-r--r--packages/web3-wrapper/CHANGELOG.md4
-rw-r--r--packages/web3-wrapper/package.json8
-rw-r--r--packages/web3-wrapper/src/marshaller.ts12
-rw-r--r--packages/web3-wrapper/src/utils.ts4
-rw-r--r--packages/web3-wrapper/src/web3_wrapper.ts2
-rw-r--r--packages/website/md/docs/sol_cov/usage.md4
-rw-r--r--packages/website/package.json30
-rw-r--r--packages/website/public/images/team/peter.jpgbin0 -> 26748 bytes
-rw-r--r--packages/website/public/images/token_icons/EOS.png (renamed from packages/website/public/images/token_icons/eos.png)bin6979 -> 6979 bytes
-rw-r--r--packages/website/public/images/token_icons/QTUM.png (renamed from packages/website/public/images/token_icons/qtum.png)bin32496 -> 32496 bytes
-rw-r--r--packages/website/public/images/token_icons/TAAS.png (renamed from packages/website/public/images/token_icons/taas.png)bin14580 -> 14580 bytes
-rw-r--r--packages/website/public/images/token_icons/WINGS.png (renamed from packages/website/public/images/token_icons/wings.png)bin3822 -> 3822 bytes
-rw-r--r--packages/website/public/index.html6
-rw-r--r--packages/website/public/js/rollbar.umd.min.js2
-rw-r--r--packages/website/public/js/rollbar.umd.nojson.min.js1
-rw-r--r--packages/website/ts/blockchain.ts62
-rw-r--r--packages/website/ts/blockchain_watcher.ts6
-rw-r--r--packages/website/ts/components/dialogs/u2f_not_supported_dialog.tsx4
-rw-r--r--packages/website/ts/components/eth_weth_conversion_button.tsx4
-rw-r--r--packages/website/ts/components/fill_order.tsx22
-rw-r--r--packages/website/ts/components/fill_warning_dialog.tsx6
-rw-r--r--packages/website/ts/components/forms/subscribe_form.tsx4
-rw-r--r--packages/website/ts/components/generate_order/asset_picker.tsx2
-rw-r--r--packages/website/ts/components/generate_order/generate_order_form.tsx40
-rw-r--r--packages/website/ts/components/inputs/allowance_toggle.tsx16
-rw-r--r--packages/website/ts/components/inputs/balance_bounded_input.tsx4
-rw-r--r--packages/website/ts/components/inputs/expiration_input.tsx2
-rw-r--r--packages/website/ts/components/legacy_portal/legacy_portal.tsx339
-rw-r--r--packages/website/ts/components/legacy_portal/legacy_portal_menu.tsx73
-rw-r--r--packages/website/ts/components/onboarding/portal_onboarding_flow.tsx17
-rw-r--r--packages/website/ts/components/order_json.tsx8
-rw-r--r--packages/website/ts/components/portal/portal.tsx13
-rw-r--r--packages/website/ts/components/relayer_index/relayer_grid_tile.tsx8
-rw-r--r--packages/website/ts/components/relayer_index/relayer_top_tokens.tsx13
-rw-r--r--packages/website/ts/components/send_button.tsx2
-rw-r--r--packages/website/ts/components/token_balances.tsx8
-rw-r--r--packages/website/ts/components/top_bar/top_bar.tsx23
-rw-r--r--packages/website/ts/components/ui/menu_item.tsx2
-rw-r--r--packages/website/ts/components/ui/overlay.tsx2
-rw-r--r--packages/website/ts/components/ui/simple_menu.tsx4
-rw-r--r--packages/website/ts/components/wallet/wallet.tsx10
-rw-r--r--packages/website/ts/components/wallet/wrap_ether_item.tsx33
-rw-r--r--packages/website/ts/containers/legacy_portal.ts92
-rw-r--r--packages/website/ts/containers/zero_ex_js_documentation.ts26
-rw-r--r--packages/website/ts/index.tsx17
-rw-r--r--packages/website/ts/local_storage/local_storage.ts8
-rw-r--r--packages/website/ts/local_storage/tracked_token_storage.ts4
-rw-r--r--packages/website/ts/local_storage/trade_history_storage.tsx18
-rw-r--r--packages/website/ts/pages/about/about.tsx25
-rw-r--r--packages/website/ts/pages/jobs/jobs.tsx2
-rw-r--r--packages/website/ts/pages/landing/landing.tsx2
-rw-r--r--packages/website/ts/pages/wiki/wiki.tsx2
-rw-r--r--packages/website/ts/redux/analyticsMiddleware.ts36
-rw-r--r--packages/website/ts/redux/dispatcher.ts2
-rw-r--r--packages/website/ts/redux/store.ts7
-rw-r--r--packages/website/ts/types.ts9
-rw-r--r--packages/website/ts/utils/analytics.ts104
-rw-r--r--packages/website/ts/utils/backend_client.ts6
-rw-r--r--packages/website/ts/utils/configs.ts10
-rw-r--r--packages/website/ts/utils/constants.ts4
-rw-r--r--packages/website/ts/utils/doc_utils.ts6
-rw-r--r--packages/website/ts/utils/error_reporter.ts33
-rw-r--r--packages/website/ts/utils/fetch_utils.ts9
-rw-r--r--packages/website/ts/utils/utils.ts79
-rw-r--r--packages/website/webpack.config.js68
381 files changed, 116403 insertions, 8134 deletions
diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json
index b39079ff2..27dafe4ca 100644
--- a/packages/0x.js/CHANGELOG.json
+++ b/packages/0x.js/CHANGELOG.json
@@ -1,5 +1,58 @@
[
{
+ "version": "1.0.0",
+ "changes": [
+ {
+ "note": "Remove tokenRegistry wrapper",
+ "pr": 863
+ },
+ {
+ "note": "Rename zeroEx.token to zeroEx.erc20Token, and add zeroEx.erc721Token",
+ "pr": 863
+ },
+ {
+ "note": "Rename zeroEx.proxy to zeroEx.erc20Proxy and add zeroEx.erc721Proxy",
+ "pr": 863
+ },
+ {
+ "note":
+ "Refactored ZeroEx.isValidSignature to zeroEx.isValidSignatureAsync. It is now async so that it can verify contract-dependent signature types",
+ "pr": 863
+ },
+ {
+ "note":
+ "Refactored signOrderHashAsync to ecSignOrderHashAsync. There are now many non-ECSignature ways to sign orders too.",
+ "pr": 863
+ },
+ {
+ "note":
+ "Removed createOrderWatcherAsync method. Will be added back once OrderWatcher is refactored for V2",
+ "pr": 863
+ },
+ {
+ "note": "0x.js exports renamed contract events and event arg types",
+ "pr": 863
+ },
+ {
+ "note": "Remove stateLayer config from OrderWatcher. It now always operates on the latest block",
+ "pr": 875
+ },
+ {
+ "note": "Export ZeroEx.assetData with methods to decode/encode assetData fields found in 0x orders",
+ "pr": 884
+ }
+ ]
+ },
+ {
+ "timestamp": 1531919263,
+ "version": "0.38.6",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1531149657,
"version": "0.38.5",
"changes": [
diff --git a/packages/0x.js/CHANGELOG.md b/packages/0x.js/CHANGELOG.md
index 00048f610..f38529715 100644
--- a/packages/0x.js/CHANGELOG.md
+++ b/packages/0x.js/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v0.38.6 - _July 18, 2018_
+
+ * Dependencies updated
+
## v0.38.5 - _July 9, 2018_
* Dependencies updated
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json
index 226452dbe..538eafd59 100644
--- a/packages/0x.js/package.json
+++ b/packages/0x.js/package.json
@@ -1,6 +1,6 @@
{
"name": "0x.js",
- "version": "0.38.5",
+ "version": "0.38.6",
"engines": {
"node": ">=6.12"
},
@@ -18,9 +18,10 @@
"watch_without_deps": "yarn pre_build && tsc -w",
"build": "yarn pre_build && yarn build:all && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"build:all": "run-p build:umd:prod build:commonjs; exit 0;",
- "pre_build": "run-s generate_contract_wrappers copy_artifacts",
- "copy_artifacts": "copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts",
- "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
+ "pre_build": "run-s update_artifacts generate_contract_wrappers",
+ "copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts",
+ "update_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json src/artifacts; done;",
+ "generate_contract_wrappers": "abi-gen --abis 'src/artifacts/@(ZRXToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
"lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*",
"test:circleci": "run-s test:coverage",
"test": "yarn run_mocha",
@@ -29,7 +30,7 @@
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"clean": "shx rm -rf _bundles lib test_temp scripts src/generated_contract_wrappers",
"build:umd:prod": "NODE_ENV=production webpack",
- "build:commonjs": "tsc && copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
+ "build:commonjs": "tsc && yarn copy_artifacts && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
"docs:stage": "node scripts/stage_docs.js",
@@ -37,7 +38,7 @@
"upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json"
},
"config": {
- "compact_artifacts": "Exchange DummyToken ZRXToken Token EtherToken TokenTransferProxy TokenRegistry",
+ "contracts": "ZRXToken",
"postpublish": {
"assets": [
"packages/0x.js/_bundles/index.js",
@@ -69,12 +70,11 @@
},
"license": "Apache-2.0",
"devDependencies": {
- "@0xproject/abi-gen": "^0.3.3",
- "@0xproject/dev-utils": "^0.4.5",
- "@0xproject/migrations": "^0.0.9",
+ "@0xproject/abi-gen": "^0.3.4",
+ "@0xproject/dev-utils": "^0.4.6",
+ "@0xproject/migrations": "^0.0.10",
"@0xproject/monorepo-scripts": "^0.2.2",
"@0xproject/tslint-config": "^0.4.21",
- "@0xproject/sol-compiler": "^0.5.2",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"@types/node": "^8.0.53",
@@ -94,22 +94,23 @@
"shx": "^0.2.2",
"sinon": "^4.0.0",
"source-map-support": "^0.5.0",
- "tslint": "5.8.0",
+ "tslint": "5.11.0",
"typedoc": "0xProject/typedoc",
"typescript": "2.7.1",
"webpack": "^3.1.0"
},
"dependencies": {
- "@0xproject/assert": "^0.2.13",
- "@0xproject/base-contract": "^0.3.5",
- "@0xproject/contract-wrappers": "^0.0.5",
- "@0xproject/order-utils": "^0.0.8",
- "@0xproject/order-watcher": "^0.0.7",
- "@0xproject/sol-compiler": "^0.5.3",
- "@0xproject/types": "^0.8.2",
- "@0xproject/typescript-typings": "^0.4.2",
- "@0xproject/utils": "^0.7.2",
- "@0xproject/web3-wrapper": "^0.7.2",
+ "@0xproject/assert": "^0.2.14",
+ "@0xproject/base-contract": "^0.3.6",
+ "@0xproject/contract-wrappers": "^0.1.1",
+ "@0xproject/order-utils": "^1.0.0",
+ "@0xproject/sol-compiler": "^0.5.4",
+ "@0xproject/subproviders": "^0.10.6",
+ "@0xproject/types": "^1.0.0",
+ "@0xproject/typescript-typings": "^0.4.3",
+ "@0xproject/utils": "^0.7.3",
+ "@0xproject/web3-wrapper": "^0.7.3",
+ "ethereum-types": "^0.0.2",
"ethers": "3.0.22",
"lodash": "^4.17.4"
},
diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts
index 001f336e7..7c06a53af 100644
--- a/packages/0x.js/src/0x.ts
+++ b/packages/0x.js/src/0x.ts
@@ -2,23 +2,28 @@ import { assert } from '@0xproject/assert';
import {
ContractWrappers,
ContractWrappersConfig,
+ ERC20ProxyWrapper,
+ ERC20TokenWrapper,
+ ERC721ProxyWrapper,
+ ERC721TokenWrapper,
EtherTokenWrapper,
ExchangeWrapper,
- TokenRegistryWrapper,
- TokenTransferProxyWrapper,
- TokenWrapper,
} from '@0xproject/contract-wrappers';
import {
+ assetDataUtils,
+ ecSignOrderHashAsync,
generatePseudoRandomSalt,
- getOrderHashHex,
- isValidOrderHash,
- isValidSignature,
- signOrderHashAsync,
+ isValidSignatureAsync,
+ MessagePrefixOpts,
+ orderHashUtils,
} from '@0xproject/order-utils';
-import { OrderWatcher, OrderWatcherConfig } from '@0xproject/order-watcher';
-import { ECSignature, Order, Provider, SignedOrder, TransactionReceiptWithDecodedLogs } from '@0xproject/types';
+// HACK: Since we export assetDataUtils from ZeroEx and it has AssetProxyId, ERC20AssetData and ERC721AssetData
+// in it's public interface, we need to import these types here.
+// tslint:disable-next-line:no-unused-variable
+import { AssetProxyId, ECSignature, ERC20AssetData, ERC721AssetData, Order, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
+import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import { constants } from './utils/constants';
@@ -34,29 +39,37 @@ export class ZeroEx {
*/
public static NULL_ADDRESS = constants.NULL_ADDRESS;
/**
+ * A set of methods to easily decode/encode assetData fields found in 0x orders.
+ */
+ public static assetData = assetDataUtils;
+ /**
* An instance of the ExchangeWrapper class containing methods for interacting with the 0x Exchange smart contract.
*/
public exchange: ExchangeWrapper;
/**
- * An instance of the TokenRegistryWrapper class containing methods for interacting with the 0x
- * TokenRegistry smart contract.
+ * An instance of the ERC20TokenWrapper class containing methods for interacting with any ERC20 token smart contract.
*/
- public tokenRegistry: TokenRegistryWrapper;
+ public erc20Token: ERC20TokenWrapper;
/**
- * An instance of the TokenWrapper class containing methods for interacting with any ERC20 token smart contract.
+ * An instance of the ERC721TokenWrapper class containing methods for interacting with any ERC721 token smart contract.
*/
- public token: TokenWrapper;
+ public erc721Token: ERC721TokenWrapper;
/**
* An instance of the EtherTokenWrapper class containing methods for interacting with the
* wrapped ETH ERC20 token smart contract.
*/
public etherToken: EtherTokenWrapper;
/**
- * An instance of the TokenTransferProxyWrapper class containing methods for interacting with the
- * tokenTransferProxy smart contract.
+ * An instance of the ERC20ProxyWrapper class containing methods for interacting with the
+ * ERC20 proxy smart contract.
+ */
+ public erc20Proxy: ERC20ProxyWrapper;
+ /**
+ * An instance of the ERC721ProxyWrapper class containing methods for interacting with the
+ * ERC721 proxy smart contract.
*/
- public proxy: TokenTransferProxyWrapper;
- private _contractWrappers: ContractWrappers;
+ public erc721Proxy: ERC721ProxyWrapper;
+ private readonly _contractWrappers: ContractWrappers;
/**
* Generates a pseudo-random 256-bit salt.
* The salt can be included in a 0x order, ensuring that the order generates a unique orderHash
@@ -67,23 +80,12 @@ export class ZeroEx {
return generatePseudoRandomSalt();
}
/**
- * Verifies that the elliptic curve signature `signature` was generated
- * by signing `data` with the private key corresponding to the `signerAddress` address.
- * @param data The hex encoded data signed by the supplied signature.
- * @param signature An object containing the elliptic curve signature parameters.
- * @param signerAddress The hex encoded address that signed the data, producing the supplied signature.
- * @return Whether the signature is valid for the supplied signerAddress and data.
- */
- public static isValidSignature(data: string, signature: ECSignature, signerAddress: string): boolean {
- return isValidSignature(data, signature, signerAddress);
- }
- /**
* Computes the orderHash for a supplied order.
* @param order An object that conforms to the Order or SignedOrder interface definitions.
* @return The resulting orderHash from hashing the supplied order.
*/
public static getOrderHashHex(order: Order | SignedOrder): string {
- return getOrderHashHex(order);
+ return orderHashUtils.getOrderHashHex(order);
}
/**
* Checks if the supplied hex encoded order hash is valid.
@@ -93,7 +95,7 @@ export class ZeroEx {
* @return Whether the supplied orderHash has the expected format.
*/
public static isValidOrderHash(orderHash: string): boolean {
- return isValidOrderHash(orderHash);
+ return orderHashUtils.isValidOrderHash(orderHash);
}
/**
* A unit amount is defined as the amount of a token above the specified decimal places (integer part).
@@ -134,13 +136,30 @@ export class ZeroEx {
assert.isWeb3Provider('provider', provider);
this._contractWrappers = new ContractWrappers(provider, config);
- this.proxy = this._contractWrappers.proxy;
- this.token = this._contractWrappers.token;
+ this.erc20Proxy = this._contractWrappers.erc20Proxy;
+ this.erc721Proxy = this._contractWrappers.erc721Proxy;
+ this.erc20Token = this._contractWrappers.erc20Token;
+ this.erc721Token = this._contractWrappers.erc721Token;
this.exchange = this._contractWrappers.exchange;
- this.tokenRegistry = this._contractWrappers.tokenRegistry;
this.etherToken = this._contractWrappers.etherToken;
}
/**
+ * Verifies that the provided signature is valid according to the 0x Protocol smart contracts
+ * @param data The hex encoded data signed by the supplied signature.
+ * @param signature The hex encoded signature.
+ * @param signerAddress The hex encoded address that signed the data, producing the supplied signature.
+ * @return Whether the signature is valid for the supplied signerAddress and data.
+ */
+ public async isValidSignatureAsync(data: string, signature: string, signerAddress: string): Promise<boolean> {
+ const isValid = await isValidSignatureAsync(
+ this._contractWrappers.getProvider(),
+ data,
+ signature,
+ signerAddress,
+ );
+ return isValid;
+ }
+ /**
* Sets a new web3 provider for 0x.js. Updating the provider will stop all
* subscriptions so you will need to re-subscribe to all events relevant to your app after this call.
* @param provider The Web3Provider you would like the 0x.js library to use from now on.
@@ -172,23 +191,21 @@ export class ZeroEx {
* @param orderHash Hex encoded orderHash to sign.
* @param signerAddress The hex encoded Ethereum address you wish to sign it with. This address
* must be available via the Provider supplied to 0x.js.
- * @param shouldAddPersonalMessagePrefix Some signers add the personal message prefix `\x19Ethereum Signed Message`
- * themselves (e.g Parity Signer, Ledger, TestRPC) and others expect it to already be done by the client
- * (e.g Metamask). Depending on which signer this request is going to, decide on whether to add the prefix
- * before sending the request.
+ * @param MessagePrefixOpts Options regarding the desired prefix and whether to add it before calling `eth_sign`
* @return An object containing the Elliptic curve signature parameters generated by signing the orderHash.
*/
- public async signOrderHashAsync(
+ public async ecSignOrderHashAsync(
orderHash: string,
signerAddress: string,
- shouldAddPersonalMessagePrefix: boolean,
+ messagePrefixOpts: MessagePrefixOpts,
): Promise<ECSignature> {
- return signOrderHashAsync(
+ const signature = await ecSignOrderHashAsync(
this._contractWrappers.getProvider(),
orderHash,
signerAddress,
- shouldAddPersonalMessagePrefix,
+ messagePrefixOpts,
);
+ return signature;
}
/**
* Waits for a transaction to be mined and returns the transaction receipt.
@@ -211,18 +228,4 @@ export class ZeroEx {
);
return transactionReceiptWithDecodedLogs;
}
- /**
- * Instantiates and returns a new OrderWatcher instance.
- * Defaults to watching the pending state.
- * @param config The configuration object. Look up the type for the description.
- * @return An instance of the 0x.js OrderWatcher class.
- */
- public async createOrderWatcherAsync(config?: OrderWatcherConfig): Promise<OrderWatcher> {
- // Hack: Get Web3Wrapper from ContractWrappers
- const web3Wrapper: Web3Wrapper = (this._contractWrappers as any)._web3Wrapper;
- const networkId = await web3Wrapper.getNetworkIdAsync();
- const provider = this._contractWrappers.getProvider();
- const orderWatcher = new OrderWatcher(provider, networkId, config);
- return orderWatcher;
- }
}
diff --git a/packages/0x.js/src/artifacts.ts b/packages/0x.js/src/artifacts.ts
new file mode 100644
index 000000000..f68969d28
--- /dev/null
+++ b/packages/0x.js/src/artifacts.ts
@@ -0,0 +1,7 @@
+import { ContractArtifact } from '@0xproject/sol-compiler';
+
+import * as ZRXToken from './artifacts/ZRXToken.json';
+
+export const artifacts = {
+ ZRXToken: (ZRXToken as any) as ContractArtifact,
+};
diff --git a/packages/0x.js/src/artifacts/ZRXToken.json b/packages/0x.js/src/artifacts/ZRXToken.json
new file mode 100644
index 000000000..0ce91c1c1
--- /dev/null
+++ b/packages/0x.js/src/artifacts/ZRXToken.json
@@ -0,0 +1,10031 @@
+{
+ "schemaVersion": "2.0.0",
+ "contractName": "ZRXToken",
+ "compilerOutput": {
+ "abi": [
+ {
+ "constant": true,
+ "inputs": [],
+ "name": "name",
+ "outputs": [
+ {
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": false,
+ "inputs": [
+ {
+ "name": "_spender",
+ "type": "address"
+ },
+ {
+ "name": "_value",
+ "type": "uint256"
+ }
+ ],
+ "name": "approve",
+ "outputs": [
+ {
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": true,
+ "inputs": [],
+ "name": "totalSupply",
+ "outputs": [
+ {
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": false,
+ "inputs": [
+ {
+ "name": "_from",
+ "type": "address"
+ },
+ {
+ "name": "_to",
+ "type": "address"
+ },
+ {
+ "name": "_value",
+ "type": "uint256"
+ }
+ ],
+ "name": "transferFrom",
+ "outputs": [
+ {
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": true,
+ "inputs": [],
+ "name": "decimals",
+ "outputs": [
+ {
+ "name": "",
+ "type": "uint8"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": true,
+ "inputs": [
+ {
+ "name": "_owner",
+ "type": "address"
+ }
+ ],
+ "name": "balanceOf",
+ "outputs": [
+ {
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": true,
+ "inputs": [],
+ "name": "symbol",
+ "outputs": [
+ {
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": false,
+ "inputs": [
+ {
+ "name": "_to",
+ "type": "address"
+ },
+ {
+ "name": "_value",
+ "type": "uint256"
+ }
+ ],
+ "name": "transfer",
+ "outputs": [
+ {
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": true,
+ "inputs": [
+ {
+ "name": "_owner",
+ "type": "address"
+ },
+ {
+ "name": "_spender",
+ "type": "address"
+ }
+ ],
+ "name": "allowance",
+ "outputs": [
+ {
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "payable": false,
+ "type": "constructor"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "name": "_from",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "name": "_to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "name": "_value",
+ "type": "uint256"
+ }
+ ],
+ "name": "Transfer",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "name": "_owner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "name": "_spender",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "name": "_value",
+ "type": "uint256"
+ }
+ ],
+ "name": "Approval",
+ "type": "event"
+ }
+ ],
+ "devdoc": {
+ "methods": {
+ "transferFrom(address,address,uint256)": {
+ "details": "ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance.",
+ "params": {
+ "_from": "Address to transfer from.",
+ "_to": "Address to transfer to.",
+ "_value": "Amount to transfer."
+ },
+ "return": "Success of transfer."
+ }
+ }
+ },
+ "evm": {
+ "assembly": " /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":795:1242 contract ZRXToken is UnlimitedAllowanceToken {... */\n mstore(0x40, 0x60)\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":958:964 10**27 */\n 0x33b2e3c9fd0803ce8000000\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":932:964 uint public totalSupply = 10**27 */\n 0x3\n sstore\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1150:1240 function ZRXToken()... */\n jumpi(tag_1, iszero(callvalue))\n invalid\ntag_1:\ntag_2:\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1222:1233 totalSupply */\n sload(0x3)\n sub(exp(0x2, 0xa0), 0x1)\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1208:1218 msg.sender */\n caller\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1199:1219 balances[msg.sender] */\n and\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1199:1207 balances */\n 0x0\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1199:1219 balances[msg.sender] */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n swap1\n sha3\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1199:1233 balances[msg.sender] = totalSupply */\n sstore\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1150:1240 function ZRXToken()... */\ntag_3:\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":795:1242 contract ZRXToken is UnlimitedAllowanceToken {... */\ntag_4:\n dataSize(sub_0)\n dup1\n dataOffset(sub_0)\n 0x0\n codecopy\n 0x0\n return\nstop\n\nsub_0: assembly {\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":795:1242 contract ZRXToken is UnlimitedAllowanceToken {... */\n mstore(0x40, 0x60)\n jumpi(tag_1, iszero(calldatasize))\n and(div(calldataload(0x0), 0x100000000000000000000000000000000000000000000000000000000), 0xffffffff)\n 0x6fdde03\n dup2\n eq\n tag_2\n jumpi\n dup1\n 0x95ea7b3\n eq\n tag_3\n jumpi\n dup1\n 0x18160ddd\n eq\n tag_4\n jumpi\n dup1\n 0x23b872dd\n eq\n tag_5\n jumpi\n dup1\n 0x313ce567\n eq\n tag_6\n jumpi\n dup1\n 0x70a08231\n eq\n tag_7\n jumpi\n dup1\n 0x95d89b41\n eq\n tag_8\n jumpi\n dup1\n 0xa9059cbb\n eq\n tag_9\n jumpi\n dup1\n 0xdd62ed3e\n eq\n tag_10\n jumpi\n tag_1:\n invalid\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1009:1058 string constant public name = \"0x Protocol Token\" */\n tag_2:\n jumpi(tag_11, iszero(callvalue))\n invalid\n tag_11:\n tag_12\n jump(tag_13)\n tag_12:\n 0x40\n dup1\n mload\n 0x20\n dup1\n dup3\n mstore\n dup4\n mload\n dup2\n dup4\n add\n mstore\n dup4\n mload\n swap2\n swap3\n dup4\n swap3\n swap1\n dup4\n add\n swap2\n dup6\n add\n swap1\n dup1\n dup4\n dup4\n /* \"--CODEGEN--\":18:20 */\n dup3\n iszero\n /* \"--CODEGEN--\":13:16 */\n tag_14\n /* \"--CODEGEN--\":7:12 */\n jumpi\n /* \"--CODEGEN--\":32:37 */\n tag_15:\n /* \"--CODEGEN--\":59:62 */\n dup1\n /* \"--CODEGEN--\":53:58 */\n mload\n /* \"--CODEGEN--\":48:51 */\n dup3\n /* \"--CODEGEN--\":41:47 */\n mstore\n /* \"--CODEGEN--\":93:95 */\n 0x20\n /* \"--CODEGEN--\":88:91 */\n dup4\n /* \"--CODEGEN--\":85:87 */\n gt\n /* \"--CODEGEN--\":78:84 */\n iszero\n /* \"--CODEGEN--\":73:76 */\n tag_14\n /* \"--CODEGEN--\":67:72 */\n jumpi\n /* \"--CODEGEN--\":152:155 */\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0\n swap1\n swap3\n add\n swap2\n /* \"--CODEGEN--\":117:119 */\n 0x20\n /* \"--CODEGEN--\":108:111 */\n swap2\n dup3\n add\n swap2\n /* \"--CODEGEN--\":130:133 */\n add\n /* \"--CODEGEN--\":172:177 */\n tag_15\n /* \"--CODEGEN--\":167:171 */\n jump\n /* \"--CODEGEN--\":181:184 */\n tag_14:\n /* \"--CODEGEN--\":3:189 */\n pop\n pop\n pop\n swap1\n pop\n swap1\n dup2\n add\n swap1\n 0x1f\n and\n dup1\n iszero\n tag_16\n jumpi\n dup1\n dup3\n sub\n dup1\n mload\n 0x1\n dup4\n 0x20\n sub\n 0x100\n exp\n sub\n not\n and\n dup2\n mstore\n 0x20\n add\n swap2\n pop\n tag_16:\n pop\n swap3\n pop\n pop\n pop\n mload(0x40)\n dup1\n swap2\n sub\n swap1\n return\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1087:1274 */\n tag_3:\n jumpi(tag_17, iszero(callvalue))\n invalid\n tag_17:\n tag_18\n and(calldataload(0x4), 0xffffffffffffffffffffffffffffffffffffffff)\n calldataload(0x24)\n jump(tag_19)\n tag_18:\n 0x40\n dup1\n mload\n swap2\n iszero\n iszero\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":932:964 uint public totalSupply = 10**27 */\n tag_4:\n jumpi(tag_20, iszero(callvalue))\n invalid\n tag_20:\n tag_21\n jump(tag_22)\n tag_21:\n 0x40\n dup1\n mload\n swap2\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1066:1675 */\n tag_5:\n jumpi(tag_23, iszero(callvalue))\n invalid\n tag_23:\n tag_18\n 0xffffffffffffffffffffffffffffffffffffffff\n calldataload(0x4)\n dup2\n and\n swap1\n calldataload(0x24)\n and\n calldataload(0x44)\n jump(tag_25)\n tag_24:\n 0x40\n dup1\n mload\n swap2\n iszero\n iszero\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":891:926 uint8 constant public decimals = 18 */\n tag_6:\n jumpi(tag_26, iszero(callvalue))\n invalid\n tag_26:\n tag_27\n jump(tag_28)\n tag_27:\n 0x40\n dup1\n mload\n 0xff\n swap1\n swap3\n and\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":982:1081 */\n tag_7:\n jumpi(tag_29, iszero(callvalue))\n invalid\n tag_29:\n tag_21\n and(calldataload(0x4), 0xffffffffffffffffffffffffffffffffffffffff)\n jump(tag_31)\n tag_30:\n 0x40\n dup1\n mload\n swap2\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1064:1101 string constant public symbol = \"ZRX\" */\n tag_8:\n jumpi(tag_32, iszero(callvalue))\n invalid\n tag_32:\n tag_12\n jump(tag_34)\n tag_33:\n 0x40\n dup1\n mload\n 0x20\n dup1\n dup3\n mstore\n dup4\n mload\n dup2\n dup4\n add\n mstore\n dup4\n mload\n swap2\n swap3\n dup4\n swap3\n swap1\n dup4\n add\n swap2\n dup6\n add\n swap1\n dup1\n dup4\n dup4\n /* \"--CODEGEN--\":18:20 */\n dup3\n iszero\n /* \"--CODEGEN--\":13:16 */\n tag_14\n /* \"--CODEGEN--\":7:12 */\n jumpi\n /* \"--CODEGEN--\":32:37 */\n tag_36:\n /* \"--CODEGEN--\":59:62 */\n dup1\n /* \"--CODEGEN--\":53:58 */\n mload\n /* \"--CODEGEN--\":48:51 */\n dup3\n /* \"--CODEGEN--\":41:47 */\n mstore\n /* \"--CODEGEN--\":93:95 */\n 0x20\n /* \"--CODEGEN--\":88:91 */\n dup4\n /* \"--CODEGEN--\":85:87 */\n gt\n /* \"--CODEGEN--\":78:84 */\n iszero\n /* \"--CODEGEN--\":73:76 */\n tag_14\n /* \"--CODEGEN--\":67:72 */\n jumpi\n /* \"--CODEGEN--\":152:155 */\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0\n swap1\n swap3\n add\n swap2\n /* \"--CODEGEN--\":117:119 */\n 0x20\n /* \"--CODEGEN--\":108:111 */\n swap2\n dup3\n add\n swap2\n /* \"--CODEGEN--\":130:133 */\n add\n /* \"--CODEGEN--\":172:177 */\n tag_15\n /* \"--CODEGEN--\":167:171 */\n jump\n /* \"--CODEGEN--\":181:184 */\n tag_35:\n /* \"--CODEGEN--\":3:189 */\n pop\n pop\n pop\n swap1\n pop\n swap1\n dup2\n add\n swap1\n 0x1f\n and\n dup1\n iszero\n tag_16\n jumpi\n dup1\n dup3\n sub\n dup1\n mload\n 0x1\n dup4\n 0x20\n sub\n 0x100\n exp\n sub\n not\n and\n dup2\n mstore\n 0x20\n add\n swap2\n pop\n tag_37:\n pop\n swap3\n pop\n pop\n pop\n mload(0x40)\n dup1\n swap2\n sub\n swap1\n return\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":125:535 */\n tag_9:\n jumpi(tag_38, iszero(callvalue))\n invalid\n tag_38:\n tag_18\n and(calldataload(0x4), 0xffffffffffffffffffffffffffffffffffffffff)\n calldataload(0x24)\n jump(tag_40)\n tag_39:\n 0x40\n dup1\n mload\n swap2\n iszero\n iszero\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1280:1406 */\n tag_10:\n jumpi(tag_41, iszero(callvalue))\n invalid\n tag_41:\n tag_21\n 0xffffffffffffffffffffffffffffffffffffffff\n calldataload(0x4)\n dup2\n and\n swap1\n calldataload(0x24)\n and\n jump(tag_43)\n tag_42:\n 0x40\n dup1\n mload\n swap2\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1009:1058 string constant public name = \"0x Protocol Token\" */\n tag_13:\n 0x40\n dup1\n mload\n dup1\n dup3\n add\n swap1\n swap2\n mstore\n 0x11\n dup2\n mstore\n 0x30782050726f746f636f6c20546f6b656e000000000000000000000000000000\n 0x20\n dup3\n add\n mstore\n dup2\n jump\t// out\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1087:1274 */\n tag_19:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n 0xffffffffffffffffffffffffffffffffffffffff\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1168:1178 */\n caller\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n dup2\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1144:1148 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n dup2\n dup2\n mstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1167 */\n 0x1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n 0x20\n swap1\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1189 */\n swap5\n dup8\n and\n dup1\n dup5\n mstore\n swap5\n dup3\n mstore\n dup1\n dup4\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1198 */\n dup7\n swap1\n sstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1208:1246 */\n dup1\n mload\n dup7\n dup2\n mstore\n swap1\n mload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1144:1148 */\n swap3\n swap5\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1189 */\n swap4\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n swap3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1208:1246 */\n 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\n swap3\n swap2\n dup2\n swap1\n sub\n swap1\n swap2\n add\n swap1\n log3\n pop\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1263:1267 */\n 0x1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1087:1274 */\n tag_44:\n swap3\n swap2\n pop\n pop\n jump\t// out\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":932:964 uint public totalSupply = 10**27 */\n tag_22:\n sload(0x3)\n dup2\n jump\t// out\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1066:1675 */\n tag_25:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1212 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup1\n dup5\n and\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1161:1165 */\n 0x0\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1212 */\n dup2\n dup2\n mstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1205 */\n 0x1\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1212 */\n 0x20\n swap1\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1213:1223 */\n caller\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1224 */\n swap1\n swap6\n and\n dup4\n mstore\n swap4\n dup2\n mstore\n dup4\n dup3\n sha3\n sload\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1253 */\n swap3\n dup3\n mstore\n dup2\n swap1\n mstore\n swap2\n dup3\n sha3\n sload\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1263 */\n dup4\n swap1\n lt\n dup1\n iszero\n swap1\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1298 */\n tag_46\n jumpi\n pop\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1292:1298 */\n dup3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1279:1288 */\n dup2\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1279:1298 */\n lt\n iszero\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1298 */\n tag_46:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1353 */\n dup1\n iszero\n tag_47\n jumpi\n pop\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1340:1353 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup5\n and\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1340:1348 */\n 0x0\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1340:1353 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n swap1\n sha3\n sload\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1314:1336 */\n dup4\n dup2\n add\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1314:1353 */\n lt\n iszero\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1353 */\n tag_47:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1234:1669 */\n iszero\n tag_48\n jumpi\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1378:1391 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup1\n dup6\n and\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1378:1386 */\n 0x0\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1378:1391 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n dup1\n dup3\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1378:1401 */\n dup1\n sload\n dup8\n add\n swap1\n sstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1415:1430 */\n swap2\n dup8\n and\n dup2\n mstore\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1415:1440 */\n dup1\n sload\n dup5\n swap1\n sub\n swap1\n sstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":768:778 */\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1458:1478 */\n dup2\n lt\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1454:1549 */\n iszero\n tag_49\n jumpi\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1512 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup1\n dup7\n and\n 0x0\n swap1\n dup2\n mstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1505 */\n 0x1\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1512 */\n 0x20\n swap1\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1513:1523 */\n caller\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1524 */\n swap1\n swap5\n and\n dup4\n mstore\n swap3\n swap1\n mstore\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1534 */\n dup1\n sload\n dup5\n swap1\n sub\n swap1\n sstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1454:1549 */\n tag_49:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1578:1581 */\n dup4\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1562:1590 */\n 0xffffffffffffffffffffffffffffffffffffffff\n and\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1571:1576 */\n dup6\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1562:1590 */\n 0xffffffffffffffffffffffffffffffffffffffff\n and\n 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1583:1589 */\n dup6\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1562:1590 */\n mload(0x40)\n dup1\n dup3\n dup2\n mstore\n 0x20\n add\n swap2\n pop\n pop\n mload(0x40)\n dup1\n swap2\n sub\n swap1\n log3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1611:1615 */\n 0x1\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1604:1615 */\n swap2\n pop\n jump(tag_50)\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1234:1669 */\n tag_48:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1653:1658 */\n 0x0\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1646:1658 */\n swap2\n pop\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1234:1669 */\n tag_50:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1066:1675 */\n tag_45:\n pop\n swap4\n swap3\n pop\n pop\n pop\n jump\t// out\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":891:926 uint8 constant public decimals = 18 */\n tag_28:\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":924:926 18 */\n 0x12\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":891:926 uint8 constant public decimals = 18 */\n dup2\n jump\t// out\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":982:1081 */\n tag_31:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1058:1074 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup2\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1035:1039 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1058:1074 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n swap1\n sha3\n sload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":982:1081 */\n tag_51:\n swap2\n swap1\n pop\n jump\t// out\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1064:1101 string constant public symbol = \"ZRX\" */\n tag_34:\n 0x40\n dup1\n mload\n dup1\n dup3\n add\n swap1\n swap2\n mstore\n 0x3\n dup2\n mstore\n 0x5a52580000000000000000000000000000000000000000000000000000000000\n 0x20\n dup3\n add\n mstore\n dup2\n jump\t// out\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":125:535 */\n tag_40:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:287 */\n 0xffffffffffffffffffffffffffffffffffffffff\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":276:286 */\n caller\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:287 */\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":178:182 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:287 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n dup2\n sha3\n sload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:297 */\n dup3\n swap1\n lt\n dup1\n iszero\n swap1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:340 */\n tag_53\n jumpi\n pop\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":327:340 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup4\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":327:335 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":327:340 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n swap1\n sha3\n sload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":301:323 */\n dup3\n dup2\n add\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":301:340 */\n lt\n iszero\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:340 */\n tag_53:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":263:529 */\n iszero\n tag_54\n jumpi\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:376 */\n 0xffffffffffffffffffffffffffffffffffffffff\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":365:375 */\n caller\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:376 */\n dup2\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:364 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:376 */\n dup2\n dup2\n mstore\n 0x20\n dup2\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:386 */\n dup1\n sload\n dup9\n swap1\n sub\n swap1\n sstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":400:413 */\n swap4\n dup8\n and\n dup1\n dup4\n mstore\n swap2\n dup5\n swap1\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":400:423 */\n dup1\n sload\n dup8\n add\n swap1\n sstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":437:470 */\n dup4\n mload\n dup7\n dup2\n mstore\n swap4\n mload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":400:413 */\n swap2\n swap4\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":437:470 */\n 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\n swap3\n swap1\n dup2\n swap1\n sub\n swap1\n swap2\n add\n swap1\n log3\n pop\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":491:495 */\n 0x1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":484:495 */\n jump(tag_44)\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":263:529 */\n tag_54:\n pop\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":521:526 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":514:526 */\n jump(tag_44)\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":263:529 */\n tag_55:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":125:535 */\n tag_52:\n swap3\n swap2\n pop\n pop\n jump\t// out\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1280:1406 */\n tag_43:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1389 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup1\n dup4\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1351:1355 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1389 */\n swap1\n dup2\n mstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1381 */\n 0x1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1389 */\n 0x20\n swap1\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1399 */\n swap4\n dup6\n and\n dup4\n mstore\n swap3\n swap1\n mstore\n sha3\n sload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1280:1406 */\n tag_56:\n swap3\n swap2\n pop\n pop\n jump\t// out\n}\n",
+ "bytecode": {
+ "linkReferences": {},
+ "object": "0x60606040526b033b2e3c9fd0803ce8000000600355341561001c57fe5b5b600354600160a060020a0333166000908152602081905260409020555b5b61078d8061004a6000396000f300606060405236156100965763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610098578063095ea7b31461014657806318160ddd1461018657806323b872dd146101a8578063313ce567146101ee57806370a082311461021457806395d89b411461024f578063a9059cbb146102fd578063dd62ed3e1461033d575bfe5b34156100a057fe5b6100a861037e565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014e57fe5b61017273ffffffffffffffffffffffffffffffffffffffff600435166024356103b5565b604080519115158252519081900360200190f35b341561018e57fe5b61019661042d565b60408051918252519081900360200190f35b34156101b057fe5b61017273ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610433565b604080519115158252519081900360200190f35b34156101f657fe5b6101fe6105d4565b6040805160ff9092168252519081900360200190f35b341561021c57fe5b61019673ffffffffffffffffffffffffffffffffffffffff600435166105d9565b60408051918252519081900360200190f35b341561025757fe5b6100a8610605565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561030557fe5b61017273ffffffffffffffffffffffffffffffffffffffff6004351660243561063c565b604080519115158252519081900360200190f35b341561034557fe5b61019673ffffffffffffffffffffffffffffffffffffffff60043581169060243516610727565b60408051918252519081900360200190f35b60408051808201909152601181527f30782050726f746f636f6c20546f6b656e000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60035481565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906104835750828110155b80156104b6575073ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090205483810110155b156105c65773ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220805487019055918716815220805484900390557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156105585773ffffffffffffffffffffffffffffffffffffffff808616600090815260016020908152604080832033909416835292905220805484900390555b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191506105cb565b600091505b5b509392505050565b601281565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020545b919050565b60408051808201909152600381527f5a52580000000000000000000000000000000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff3316600090815260208190526040812054829010801590610699575073ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110155b156107185773ffffffffffffffffffffffffffffffffffffffff33811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610427565b506000610427565b5b92915050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600160209081526040808320938516835292905220545b929150505600a165627a7a723058208999c5329f53064aac58d4b553cb379a45bfca17e024506ff916637cfc36f7b20029",
+ "opcodes": "PUSH1 0x60 PUSH1 0x40 MSTORE PUSH12 0x33B2E3C9FD0803CE8000000 PUSH1 0x3 SSTORE CALLVALUE ISZERO PUSH2 0x1C JUMPI INVALID JUMPDEST JUMPDEST PUSH1 0x3 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB CALLER AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SSTORE JUMPDEST JUMPDEST PUSH2 0x78D DUP1 PUSH2 0x4A PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x60 PUSH1 0x40 MSTORE CALLDATASIZE ISZERO PUSH2 0x96 JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x6FDDE03 DUP2 EQ PUSH2 0x98 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x146 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x186 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x1A8 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x1EE JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x214 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x24F JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x2FD JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x33D JUMPI JUMPDEST INVALID JUMPDEST CALLVALUE ISZERO PUSH2 0xA0 JUMPI INVALID JUMPDEST PUSH2 0xA8 PUSH2 0x37E JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 DUP3 ISZERO PUSH2 0x10C JUMPI JUMPDEST DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP4 GT ISZERO PUSH2 0x10C JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0xCE JUMP JUMPDEST POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x138 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x14E JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x3B5 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x18E JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH2 0x42D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x1B0 JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH1 0x44 CALLDATALOAD PUSH2 0x433 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x1F6 JUMPI INVALID JUMPDEST PUSH2 0x1FE PUSH2 0x5D4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x21C JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0x5D9 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x257 JUMPI INVALID JUMPDEST PUSH2 0xA8 PUSH2 0x605 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 DUP3 ISZERO PUSH2 0x10C JUMPI JUMPDEST DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP4 GT ISZERO PUSH2 0x10C JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0xCE JUMP JUMPDEST POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x138 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x305 JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x63C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x345 JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x727 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x11 DUP2 MSTORE PUSH32 0x30782050726F746F636F6C20546F6B656E000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 DUP3 MSTORE DUP1 DUP4 SHA3 DUP7 SWAP1 SSTORE DUP1 MLOAD DUP7 DUP2 MSTORE SWAP1 MLOAD SWAP3 SWAP5 SWAP4 SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP2 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 CALLER SWAP1 SWAP6 AND DUP4 MSTORE SWAP4 DUP2 MSTORE DUP4 DUP3 SHA3 SLOAD SWAP3 DUP3 MSTORE DUP2 SWAP1 MSTORE SWAP2 DUP3 SHA3 SLOAD DUP4 SWAP1 LT DUP1 ISZERO SWAP1 PUSH2 0x483 JUMPI POP DUP3 DUP2 LT ISZERO JUMPDEST DUP1 ISZERO PUSH2 0x4B6 JUMPI POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD DUP4 DUP2 ADD LT ISZERO JUMPDEST ISZERO PUSH2 0x5C6 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 SHA3 DUP1 SLOAD DUP8 ADD SWAP1 SSTORE SWAP2 DUP8 AND DUP2 MSTORE SHA3 DUP1 SLOAD DUP5 SWAP1 SUB SWAP1 SSTORE PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 LT ISZERO PUSH2 0x558 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP7 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 CALLER SWAP1 SWAP5 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE SHA3 DUP1 SLOAD DUP5 SWAP1 SUB SWAP1 SSTORE JUMPDEST DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF DUP6 PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 PUSH1 0x1 SWAP2 POP PUSH2 0x5CB JUMP JUMPDEST PUSH1 0x0 SWAP2 POP JUMPDEST JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x12 DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x3 DUP2 MSTORE PUSH32 0x5A52580000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 SHA3 SLOAD DUP3 SWAP1 LT DUP1 ISZERO SWAP1 PUSH2 0x699 JUMPI POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD DUP3 DUP2 ADD LT ISZERO JUMPDEST ISZERO PUSH2 0x718 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 DUP1 SLOAD DUP9 SWAP1 SUB SWAP1 SSTORE SWAP4 DUP8 AND DUP1 DUP4 MSTORE SWAP2 DUP5 SWAP1 SHA3 DUP1 SLOAD DUP8 ADD SWAP1 SSTORE DUP4 MLOAD DUP7 DUP2 MSTORE SWAP4 MLOAD SWAP2 SWAP4 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 SWAP1 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 PUSH2 0x427 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x427 JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 SWAP4 DUP6 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE SHA3 SLOAD JUMPDEST SWAP3 SWAP2 POP POP JUMP STOP LOG1 PUSH6 0x627A7A723058 SHA3 DUP10 SWAP10 0xc5 ORIGIN SWAP16 MSTORE8 MOD 0x4a 0xac PC 0xd4 0xb5 MSTORE8 0xcb CALLDATACOPY SWAP11 GASLIMIT 0xbf 0xca OR 0xe0 0x24 POP PUSH16 0xF916637CFC36F7B20029000000000000 ",
+ "sourceMap": "795:447:3:-;;;958:6;932:32;;1150:90;;;;;;;1222:11;;-1:-1:-1;;;;;1208:10:3;1199:20;:8;:20;;;;;;;;;;:34;1150:90;795:447;;;;;;;"
+ },
+ "deployedBytecode": {
+ "linkReferences": {},
+ "object": "0x606060405236156100965763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610098578063095ea7b31461014657806318160ddd1461018657806323b872dd146101a8578063313ce567146101ee57806370a082311461021457806395d89b411461024f578063a9059cbb146102fd578063dd62ed3e1461033d575bfe5b34156100a057fe5b6100a861037e565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014e57fe5b61017273ffffffffffffffffffffffffffffffffffffffff600435166024356103b5565b604080519115158252519081900360200190f35b341561018e57fe5b61019661042d565b60408051918252519081900360200190f35b34156101b057fe5b61017273ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610433565b604080519115158252519081900360200190f35b34156101f657fe5b6101fe6105d4565b6040805160ff9092168252519081900360200190f35b341561021c57fe5b61019673ffffffffffffffffffffffffffffffffffffffff600435166105d9565b60408051918252519081900360200190f35b341561025757fe5b6100a8610605565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561030557fe5b61017273ffffffffffffffffffffffffffffffffffffffff6004351660243561063c565b604080519115158252519081900360200190f35b341561034557fe5b61019673ffffffffffffffffffffffffffffffffffffffff60043581169060243516610727565b60408051918252519081900360200190f35b60408051808201909152601181527f30782050726f746f636f6c20546f6b656e000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60035481565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906104835750828110155b80156104b6575073ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090205483810110155b156105c65773ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220805487019055918716815220805484900390557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156105585773ffffffffffffffffffffffffffffffffffffffff808616600090815260016020908152604080832033909416835292905220805484900390555b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191506105cb565b600091505b5b509392505050565b601281565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020545b919050565b60408051808201909152600381527f5a52580000000000000000000000000000000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff3316600090815260208190526040812054829010801590610699575073ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110155b156107185773ffffffffffffffffffffffffffffffffffffffff33811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610427565b506000610427565b5b92915050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600160209081526040808320938516835292905220545b929150505600a165627a7a723058208999c5329f53064aac58d4b553cb379a45bfca17e024506ff916637cfc36f7b20029",
+ "opcodes": "PUSH1 0x60 PUSH1 0x40 MSTORE CALLDATASIZE ISZERO PUSH2 0x96 JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x6FDDE03 DUP2 EQ PUSH2 0x98 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x146 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x186 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x1A8 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x1EE JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x214 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x24F JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x2FD JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x33D JUMPI JUMPDEST INVALID JUMPDEST CALLVALUE ISZERO PUSH2 0xA0 JUMPI INVALID JUMPDEST PUSH2 0xA8 PUSH2 0x37E JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 DUP3 ISZERO PUSH2 0x10C JUMPI JUMPDEST DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP4 GT ISZERO PUSH2 0x10C JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0xCE JUMP JUMPDEST POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x138 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x14E JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x3B5 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x18E JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH2 0x42D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x1B0 JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH1 0x44 CALLDATALOAD PUSH2 0x433 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x1F6 JUMPI INVALID JUMPDEST PUSH2 0x1FE PUSH2 0x5D4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x21C JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0x5D9 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x257 JUMPI INVALID JUMPDEST PUSH2 0xA8 PUSH2 0x605 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 DUP3 ISZERO PUSH2 0x10C JUMPI JUMPDEST DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP4 GT ISZERO PUSH2 0x10C JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0xCE JUMP JUMPDEST POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x138 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x305 JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x63C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x345 JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x727 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x11 DUP2 MSTORE PUSH32 0x30782050726F746F636F6C20546F6B656E000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 DUP3 MSTORE DUP1 DUP4 SHA3 DUP7 SWAP1 SSTORE DUP1 MLOAD DUP7 DUP2 MSTORE SWAP1 MLOAD SWAP3 SWAP5 SWAP4 SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP2 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 CALLER SWAP1 SWAP6 AND DUP4 MSTORE SWAP4 DUP2 MSTORE DUP4 DUP3 SHA3 SLOAD SWAP3 DUP3 MSTORE DUP2 SWAP1 MSTORE SWAP2 DUP3 SHA3 SLOAD DUP4 SWAP1 LT DUP1 ISZERO SWAP1 PUSH2 0x483 JUMPI POP DUP3 DUP2 LT ISZERO JUMPDEST DUP1 ISZERO PUSH2 0x4B6 JUMPI POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD DUP4 DUP2 ADD LT ISZERO JUMPDEST ISZERO PUSH2 0x5C6 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 SHA3 DUP1 SLOAD DUP8 ADD SWAP1 SSTORE SWAP2 DUP8 AND DUP2 MSTORE SHA3 DUP1 SLOAD DUP5 SWAP1 SUB SWAP1 SSTORE PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 LT ISZERO PUSH2 0x558 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP7 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 CALLER SWAP1 SWAP5 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE SHA3 DUP1 SLOAD DUP5 SWAP1 SUB SWAP1 SSTORE JUMPDEST DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF DUP6 PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 PUSH1 0x1 SWAP2 POP PUSH2 0x5CB JUMP JUMPDEST PUSH1 0x0 SWAP2 POP JUMPDEST JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x12 DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x3 DUP2 MSTORE PUSH32 0x5A52580000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 SHA3 SLOAD DUP3 SWAP1 LT DUP1 ISZERO SWAP1 PUSH2 0x699 JUMPI POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD DUP3 DUP2 ADD LT ISZERO JUMPDEST ISZERO PUSH2 0x718 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 DUP1 SLOAD DUP9 SWAP1 SUB SWAP1 SSTORE SWAP4 DUP8 AND DUP1 DUP4 MSTORE SWAP2 DUP5 SWAP1 SHA3 DUP1 SLOAD DUP8 ADD SWAP1 SSTORE DUP4 MLOAD DUP7 DUP2 MSTORE SWAP4 MLOAD SWAP2 SWAP4 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 SWAP1 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 PUSH2 0x427 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x427 JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 SWAP4 DUP6 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE SHA3 SLOAD JUMPDEST SWAP3 SWAP2 POP POP JUMP STOP LOG1 PUSH6 0x627A7A723058 SHA3 DUP10 SWAP10 0xc5 ORIGIN SWAP16 MSTORE8 MOD 0x4a 0xac PC 0xd4 0xb5 MSTORE8 0xcb CALLDATACOPY SWAP11 GASLIMIT 0xbf 0xca OR 0xe0 0x24 POP PUSH16 0xF916637CFC36F7B20029000000000000 ",
+ "sourceMap": "795:447:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1009:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18:2:-1;;13:3;7:5;32;59:3;53:5;48:3;41:6;93:2;88:3;85:2;78:6;73:3;67:5;152:3;;;;;117:2;108:3;;;;130;172:5;167:4;181:3;3:186;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1087:187:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;932:32:3;;;;;;;;;;;;;;;;;;;;;;;;;;1066:609:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;891:35:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;982:99:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1064:37:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18:2:-1;;13:3;7:5;32;59:3;53:5;48:3;41:6;93:2;88:3;85:2;78:6;73:3;67:5;152:3;;;;;117:2;108:3;;;;130;172:5;167:4;181:3;3:186;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;125:410:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1280:126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1009:49:3;;;;;;;;;;;;;;;;;;;:::o;1087:187:0:-;1160:19;1168:10;1160:19;;1144:4;1160:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;:38;;;1208;;;;;;;1144:4;;1160:29;:19;1208:38;;;;;;;;;;;-1:-1:-1;1263:4:0;1087:187;;;;;:::o;932:32:3:-;;;;:::o;1066:609:2:-;1198:14;;;;1161:4;1198:14;;;:7;:14;;;;;;;;1213:10;1198:26;;;;;;;;;;;;1238:15;;;;;;;;;;:25;;;;;;:60;;;1292:6;1279:9;:19;;1238:60;:115;;;;-1:-1:-1;1340:13:2;;;:8;:13;;;;;;;;;;;1314:22;;;:39;;1238:115;1234:435;;;1378:13;;;;:8;:13;;;;;;;;;;;:23;;;;;;1415:15;;;;;;:25;;;;;;;768:10;1458:20;;1454:95;;;1498:14;;;;;;;;:7;:14;;;;;;;;1513:10;1498:26;;;;;;;;;:36;;;;;;;1454:95;1578:3;1562:28;;1571:5;1562:28;;;1583:6;1562:28;;;;;;;;;;;;;;;;;;1611:4;1604:11;;;;1234:435;1653:5;1646:12;;1234:435;1066:609;;;;;;;:::o;891:35:3:-;924:2;891:35;:::o;982:99:0:-;1058:16;;;1035:4;1058:16;;;;;;;;;;;982:99;;;;:::o;1064:37:3:-;;;;;;;;;;;;;;;;;;;:::o;125:410:0:-;267:20;276:10;267:20;178:4;267:20;;;;;;;;;;;:30;;;;;;:73;;-1:-1:-1;327:13:0;;;:8;:13;;;;;;;;;;;301:22;;;:39;;267:73;263:266;;;356:20;365:10;356:20;;:8;:20;;;;;;;;;;;:30;;;;;;;400:13;;;;;;;;;;:23;;;;;;437:33;;;;;;;400:13;;437:33;;;;;;;;;;;-1:-1:-1;491:4:0;484:11;;263:266;-1:-1:-1;521:5:0;514:12;;263:266;125:410;;;;;:::o;1280:126::-;1374:15;;;;1351:4;1374:15;;;:7;:15;;;;;;;;:25;;;;;;;;;;1280:126;;;;;:::o"
+ },
+ "gasEstimates": {
+ "creation": {
+ "codeDepositCost": "386600",
+ "executionCost": "40780",
+ "totalCost": "427380"
+ },
+ "external": {
+ "allowance(address,address)": "737",
+ "approve(address,uint256)": "22218",
+ "balanceOf(address)": "579",
+ "decimals()": "270",
+ "name()": "530",
+ "symbol()": "662",
+ "totalSupply()": "417",
+ "transfer(address,uint256)": "43393",
+ "transferFrom(address,address,uint256)": "64116"
+ }
+ },
+ "legacyAssembly": {
+ ".code": [
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "60"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 958,
+ "end": 964,
+ "name": "PUSH",
+ "value": "33B2E3C9FD0803CE8000000"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "PUSH",
+ "value": "3"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "PUSH [tag]",
+ "value": "1"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "INVALID"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "tag",
+ "value": "1"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "tag",
+ "value": "2"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1222,
+ "end": 1233,
+ "name": "PUSH",
+ "value": "3"
+ },
+ {
+ "begin": 1222,
+ "end": 1233,
+ "name": "SLOAD"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "PUSH",
+ "value": "A0"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "PUSH",
+ "value": "2"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "EXP"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "SUB"
+ },
+ {
+ "begin": 1208,
+ "end": 1218,
+ "name": "CALLER"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "AND"
+ },
+ {
+ "begin": 1199,
+ "end": 1207,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1199,
+ "end": 1233,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "tag",
+ "value": "3"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "tag",
+ "value": "4"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH #[$]",
+ "value": "0000000000000000000000000000000000000000000000000000000000000000"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [$]",
+ "value": "0000000000000000000000000000000000000000000000000000000000000000"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "CODECOPY"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "RETURN"
+ }
+ ],
+ ".data": {
+ "0": {
+ ".code": [
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "60"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "CALLDATASIZE"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "FFFFFFFF"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "100000000000000000000000000000000000000000000000000000000"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DIV"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "AND"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "6FDDE03"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP2"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "2"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "95EA7B3"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "3"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "18160DDD"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "4"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "23B872DD"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "5"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "313CE567"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "6"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "70A08231"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "7"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "95D89B41"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "8"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "A9059CBB"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "9"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "DD62ED3E"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "10"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "tag",
+ "value": "1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "INVALID"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "tag",
+ "value": "2"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH [tag]",
+ "value": "11"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "INVALID"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "tag",
+ "value": "11"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH [tag]",
+ "value": "12"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH [tag]",
+ "value": "13"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "JUMP"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "tag",
+ "value": "12"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "ADD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "ADD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP6"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "ADD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP4"
+ },
+ {
+ "begin": 18,
+ "end": 20,
+ "name": "DUP3"
+ },
+ {
+ "begin": 18,
+ "end": 20,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 13,
+ "end": 16,
+ "name": "PUSH [tag]",
+ "value": "14"
+ },
+ {
+ "begin": 7,
+ "end": 12,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 32,
+ "end": 37,
+ "name": "tag",
+ "value": "15"
+ },
+ {
+ "begin": 32,
+ "end": 37,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 59,
+ "end": 62,
+ "name": "DUP1"
+ },
+ {
+ "begin": 53,
+ "end": 58,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 48,
+ "end": 51,
+ "name": "DUP3"
+ },
+ {
+ "begin": 41,
+ "end": 47,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 93,
+ "end": 95,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 88,
+ "end": 91,
+ "name": "DUP4"
+ },
+ {
+ "begin": 85,
+ "end": 87,
+ "name": "GT"
+ },
+ {
+ "begin": 78,
+ "end": 84,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 73,
+ "end": 76,
+ "name": "PUSH [tag]",
+ "value": "14"
+ },
+ {
+ "begin": 67,
+ "end": 72,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "ADD"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 117,
+ "end": 119,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "DUP3"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "ADD"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 130,
+ "end": 133,
+ "name": "ADD"
+ },
+ {
+ "begin": 172,
+ "end": 177,
+ "name": "PUSH [tag]",
+ "value": "15"
+ },
+ {
+ "begin": 167,
+ "end": 171,
+ "name": "JUMP"
+ },
+ {
+ "begin": 181,
+ "end": 184,
+ "name": "tag",
+ "value": "14"
+ },
+ {
+ "begin": 181,
+ "end": 184,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "ADD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "1F"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "AND"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH [tag]",
+ "value": "16"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP3"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP4"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "100"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "EXP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "NOT"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "AND"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "ADD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "tag",
+ "value": "16"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "RETURN"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "tag",
+ "value": "3"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH [tag]",
+ "value": "17"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "INVALID"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "tag",
+ "value": "17"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH [tag]",
+ "value": "18"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH",
+ "value": "4"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "AND"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH",
+ "value": "24"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH [tag]",
+ "value": "19"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMP"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "tag",
+ "value": "18"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "SUB"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "ADD"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "RETURN"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "tag",
+ "value": "4"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "PUSH [tag]",
+ "value": "20"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "INVALID"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "tag",
+ "value": "20"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "PUSH [tag]",
+ "value": "21"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "PUSH [tag]",
+ "value": "22"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "JUMP"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "tag",
+ "value": "21"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "DUP1"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "DUP3"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "DUP2"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "SUB"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "ADD"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "RETURN"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "tag",
+ "value": "5"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH [tag]",
+ "value": "23"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "INVALID"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "tag",
+ "value": "23"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH [tag]",
+ "value": "18"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH",
+ "value": "4"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "AND"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH",
+ "value": "24"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "AND"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH",
+ "value": "44"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH [tag]",
+ "value": "25"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMP"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "tag",
+ "value": "24"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SUB"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "ADD"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "RETURN"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "tag",
+ "value": "6"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "PUSH [tag]",
+ "value": "26"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "INVALID"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "tag",
+ "value": "26"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "PUSH [tag]",
+ "value": "27"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "PUSH [tag]",
+ "value": "28"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "JUMP"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "tag",
+ "value": "27"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "DUP1"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "PUSH",
+ "value": "FF"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "AND"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "DUP3"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "DUP2"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "SUB"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "ADD"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "RETURN"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "tag",
+ "value": "7"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "PUSH [tag]",
+ "value": "29"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "INVALID"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "tag",
+ "value": "29"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "PUSH [tag]",
+ "value": "21"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "PUSH",
+ "value": "4"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "AND"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "PUSH [tag]",
+ "value": "31"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMP"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "tag",
+ "value": "30"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "DUP1"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "DUP3"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "DUP2"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "SUB"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "ADD"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "RETURN"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "tag",
+ "value": "8"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH [tag]",
+ "value": "32"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "INVALID"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "tag",
+ "value": "32"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH [tag]",
+ "value": "12"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH [tag]",
+ "value": "34"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "JUMP"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "tag",
+ "value": "33"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "ADD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "ADD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP6"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "ADD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP4"
+ },
+ {
+ "begin": 18,
+ "end": 20,
+ "name": "DUP3"
+ },
+ {
+ "begin": 18,
+ "end": 20,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 13,
+ "end": 16,
+ "name": "PUSH [tag]",
+ "value": "14"
+ },
+ {
+ "begin": 7,
+ "end": 12,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 32,
+ "end": 37,
+ "name": "tag",
+ "value": "36"
+ },
+ {
+ "begin": 32,
+ "end": 37,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 59,
+ "end": 62,
+ "name": "DUP1"
+ },
+ {
+ "begin": 53,
+ "end": 58,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 48,
+ "end": 51,
+ "name": "DUP3"
+ },
+ {
+ "begin": 41,
+ "end": 47,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 93,
+ "end": 95,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 88,
+ "end": 91,
+ "name": "DUP4"
+ },
+ {
+ "begin": 85,
+ "end": 87,
+ "name": "GT"
+ },
+ {
+ "begin": 78,
+ "end": 84,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 73,
+ "end": 76,
+ "name": "PUSH [tag]",
+ "value": "14"
+ },
+ {
+ "begin": 67,
+ "end": 72,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "ADD"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 117,
+ "end": 119,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "DUP3"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "ADD"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 130,
+ "end": 133,
+ "name": "ADD"
+ },
+ {
+ "begin": 172,
+ "end": 177,
+ "name": "PUSH [tag]",
+ "value": "15"
+ },
+ {
+ "begin": 167,
+ "end": 171,
+ "name": "JUMP"
+ },
+ {
+ "begin": 181,
+ "end": 184,
+ "name": "tag",
+ "value": "35"
+ },
+ {
+ "begin": 181,
+ "end": 184,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "ADD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "1F"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "AND"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH [tag]",
+ "value": "16"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP3"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP4"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "100"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "EXP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "NOT"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "AND"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "ADD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "tag",
+ "value": "37"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "RETURN"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "tag",
+ "value": "9"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH [tag]",
+ "value": "38"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "INVALID"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "tag",
+ "value": "38"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH [tag]",
+ "value": "18"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH",
+ "value": "4"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "AND"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH",
+ "value": "24"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH [tag]",
+ "value": "40"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMP"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "tag",
+ "value": "39"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "DUP1"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "DUP3"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "DUP2"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "SUB"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "ADD"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "RETURN"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "tag",
+ "value": "10"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH [tag]",
+ "value": "41"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "INVALID"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "tag",
+ "value": "41"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH [tag]",
+ "value": "21"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH",
+ "value": "4"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "AND"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH",
+ "value": "24"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "AND"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH [tag]",
+ "value": "43"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMP"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "tag",
+ "value": "42"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SUB"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "ADD"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "RETURN"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "tag",
+ "value": "13"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "ADD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH",
+ "value": "11"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH",
+ "value": "30782050726F746F636F6C20546F6B656E000000000000000000000000000000"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "ADD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "tag",
+ "value": "19"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1168,
+ "end": 1178,
+ "name": "CALLER"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "AND"
+ },
+ {
+ "begin": 1144,
+ "end": 1148,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1160,
+ "end": 1167,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "SWAP5"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "DUP8"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "AND"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "DUP5"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "SWAP5"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1160,
+ "end": 1198,
+ "name": "DUP7"
+ },
+ {
+ "begin": 1160,
+ "end": 1198,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1160,
+ "end": 1198,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "DUP7"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1144,
+ "end": 1148,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1144,
+ "end": 1148,
+ "name": "SWAP5"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "SWAP4"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "PUSH",
+ "value": "8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SUB"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "ADD"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "LOG3"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "POP"
+ },
+ {
+ "begin": 1263,
+ "end": 1267,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "tag",
+ "value": "44"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "POP"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "POP"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "tag",
+ "value": "22"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "PUSH",
+ "value": "3"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "DUP2"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "tag",
+ "value": "25"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "DUP5"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "AND"
+ },
+ {
+ "begin": 1161,
+ "end": 1165,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1198,
+ "end": 1205,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1213,
+ "end": 1223,
+ "name": "CALLER"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "SWAP6"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "AND"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "SWAP4"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 1238,
+ "end": 1263,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1238,
+ "end": 1263,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1238,
+ "end": 1263,
+ "name": "LT"
+ },
+ {
+ "begin": 1238,
+ "end": 1263,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1238,
+ "end": 1263,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1238,
+ "end": 1263,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1238,
+ "end": 1298,
+ "name": "PUSH [tag]",
+ "value": "46"
+ },
+ {
+ "begin": 1238,
+ "end": 1298,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1238,
+ "end": 1298,
+ "name": "POP"
+ },
+ {
+ "begin": 1292,
+ "end": 1298,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1279,
+ "end": 1288,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1279,
+ "end": 1298,
+ "name": "LT"
+ },
+ {
+ "begin": 1279,
+ "end": 1298,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1238,
+ "end": 1298,
+ "name": "tag",
+ "value": "46"
+ },
+ {
+ "begin": 1238,
+ "end": 1298,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1238,
+ "end": 1353,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1238,
+ "end": 1353,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1238,
+ "end": 1353,
+ "name": "PUSH [tag]",
+ "value": "47"
+ },
+ {
+ "begin": 1238,
+ "end": 1353,
+ "name": "JUMPI"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "POP"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "DUP5"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "AND"
+ },
+ {
+ "begin": 1340,
+ "end": 1348,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 1314,
+ "end": 1336,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1314,
+ "end": 1336,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1314,
+ "end": 1336,
+ "name": "ADD"
+ },
+ {
+ "begin": 1314,
+ "end": 1353,
+ "name": "LT"
+ },
+ {
+ "begin": 1314,
+ "end": 1353,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1238,
+ "end": 1353,
+ "name": "tag",
+ "value": "47"
+ },
+ {
+ "begin": 1238,
+ "end": 1353,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1234,
+ "end": 1669,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1234,
+ "end": 1669,
+ "name": "PUSH [tag]",
+ "value": "48"
+ },
+ {
+ "begin": 1234,
+ "end": 1669,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "DUP6"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "AND"
+ },
+ {
+ "begin": 1378,
+ "end": 1386,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1378,
+ "end": 1401,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1378,
+ "end": 1401,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 1378,
+ "end": 1401,
+ "name": "DUP8"
+ },
+ {
+ "begin": 1378,
+ "end": 1401,
+ "name": "ADD"
+ },
+ {
+ "begin": 1378,
+ "end": 1401,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1378,
+ "end": 1401,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 1415,
+ "end": 1430,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1415,
+ "end": 1430,
+ "name": "DUP8"
+ },
+ {
+ "begin": 1415,
+ "end": 1430,
+ "name": "AND"
+ },
+ {
+ "begin": 1415,
+ "end": 1430,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1415,
+ "end": 1430,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1415,
+ "end": 1430,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1415,
+ "end": 1440,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1415,
+ "end": 1440,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 1415,
+ "end": 1440,
+ "name": "DUP5"
+ },
+ {
+ "begin": 1415,
+ "end": 1440,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1415,
+ "end": 1440,
+ "name": "SUB"
+ },
+ {
+ "begin": 1415,
+ "end": 1440,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1415,
+ "end": 1440,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 768,
+ "end": 778,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1458,
+ "end": 1478,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1458,
+ "end": 1478,
+ "name": "LT"
+ },
+ {
+ "begin": 1454,
+ "end": 1549,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1454,
+ "end": 1549,
+ "name": "PUSH [tag]",
+ "value": "49"
+ },
+ {
+ "begin": 1454,
+ "end": 1549,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "DUP7"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "AND"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1498,
+ "end": 1505,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1513,
+ "end": 1523,
+ "name": "CALLER"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "SWAP5"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "AND"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1498,
+ "end": 1534,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1534,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 1498,
+ "end": 1534,
+ "name": "DUP5"
+ },
+ {
+ "begin": 1498,
+ "end": 1534,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1534,
+ "name": "SUB"
+ },
+ {
+ "begin": 1498,
+ "end": 1534,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1534,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 1454,
+ "end": 1549,
+ "name": "tag",
+ "value": "49"
+ },
+ {
+ "begin": 1454,
+ "end": 1549,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1578,
+ "end": 1581,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "AND"
+ },
+ {
+ "begin": 1571,
+ "end": 1576,
+ "name": "DUP6"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "AND"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "PUSH",
+ "value": "DDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF"
+ },
+ {
+ "begin": 1583,
+ "end": 1589,
+ "name": "DUP6"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "ADD"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "POP"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "POP"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "SUB"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "LOG3"
+ },
+ {
+ "begin": 1611,
+ "end": 1615,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 1604,
+ "end": 1615,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1604,
+ "end": 1615,
+ "name": "POP"
+ },
+ {
+ "begin": 1604,
+ "end": 1615,
+ "name": "PUSH [tag]",
+ "value": "50"
+ },
+ {
+ "begin": 1604,
+ "end": 1615,
+ "name": "JUMP"
+ },
+ {
+ "begin": 1234,
+ "end": 1669,
+ "name": "tag",
+ "value": "48"
+ },
+ {
+ "begin": 1234,
+ "end": 1669,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1653,
+ "end": 1658,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1646,
+ "end": 1658,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1646,
+ "end": 1658,
+ "name": "POP"
+ },
+ {
+ "begin": 1234,
+ "end": 1669,
+ "name": "tag",
+ "value": "50"
+ },
+ {
+ "begin": 1234,
+ "end": 1669,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "tag",
+ "value": "45"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "POP"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SWAP4"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "POP"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "POP"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "POP"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "tag",
+ "value": "28"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 924,
+ "end": 926,
+ "name": "PUSH",
+ "value": "12"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "DUP2"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "tag",
+ "value": "31"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "AND"
+ },
+ {
+ "begin": 1035,
+ "end": 1039,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "tag",
+ "value": "51"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "POP"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "tag",
+ "value": "34"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "ADD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH",
+ "value": "3"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH",
+ "value": "5A52580000000000000000000000000000000000000000000000000000000000"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "ADD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "tag",
+ "value": "40"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 276,
+ "end": 286,
+ "name": "CALLER"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "AND"
+ },
+ {
+ "begin": 178,
+ "end": 182,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "DUP2"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "DUP2"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "DUP2"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "SHA3"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 267,
+ "end": 297,
+ "name": "DUP3"
+ },
+ {
+ "begin": 267,
+ "end": 297,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 267,
+ "end": 297,
+ "name": "LT"
+ },
+ {
+ "begin": 267,
+ "end": 297,
+ "name": "DUP1"
+ },
+ {
+ "begin": 267,
+ "end": 297,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 267,
+ "end": 297,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 267,
+ "end": 340,
+ "name": "PUSH [tag]",
+ "value": "53"
+ },
+ {
+ "begin": 267,
+ "end": 340,
+ "name": "JUMPI"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "POP"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "DUP4"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "AND"
+ },
+ {
+ "begin": 327,
+ "end": 335,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "DUP2"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "DUP2"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "SHA3"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 301,
+ "end": 323,
+ "name": "DUP3"
+ },
+ {
+ "begin": 301,
+ "end": 323,
+ "name": "DUP2"
+ },
+ {
+ "begin": 301,
+ "end": 323,
+ "name": "ADD"
+ },
+ {
+ "begin": 301,
+ "end": 340,
+ "name": "LT"
+ },
+ {
+ "begin": 301,
+ "end": 340,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 267,
+ "end": 340,
+ "name": "tag",
+ "value": "53"
+ },
+ {
+ "begin": 267,
+ "end": 340,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 263,
+ "end": 529,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 263,
+ "end": 529,
+ "name": "PUSH [tag]",
+ "value": "54"
+ },
+ {
+ "begin": 263,
+ "end": 529,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 365,
+ "end": 375,
+ "name": "CALLER"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "DUP2"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "AND"
+ },
+ {
+ "begin": 356,
+ "end": 364,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "DUP2"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "DUP2"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "DUP2"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "DUP2"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "DUP1"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "DUP4"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "SHA3"
+ },
+ {
+ "begin": 356,
+ "end": 386,
+ "name": "DUP1"
+ },
+ {
+ "begin": 356,
+ "end": 386,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 356,
+ "end": 386,
+ "name": "DUP9"
+ },
+ {
+ "begin": 356,
+ "end": 386,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 356,
+ "end": 386,
+ "name": "SUB"
+ },
+ {
+ "begin": 356,
+ "end": 386,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 356,
+ "end": 386,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "SWAP4"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "DUP8"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "AND"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "DUP1"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "DUP4"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "DUP5"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "SHA3"
+ },
+ {
+ "begin": 400,
+ "end": 423,
+ "name": "DUP1"
+ },
+ {
+ "begin": 400,
+ "end": 423,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 400,
+ "end": 423,
+ "name": "DUP8"
+ },
+ {
+ "begin": 400,
+ "end": 423,
+ "name": "ADD"
+ },
+ {
+ "begin": 400,
+ "end": 423,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 400,
+ "end": 423,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "DUP4"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "DUP7"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "DUP2"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SWAP4"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "SWAP4"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "PUSH",
+ "value": "DDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "DUP2"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SUB"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "ADD"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "LOG3"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "POP"
+ },
+ {
+ "begin": 491,
+ "end": 495,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 484,
+ "end": 495,
+ "name": "PUSH [tag]",
+ "value": "44"
+ },
+ {
+ "begin": 484,
+ "end": 495,
+ "name": "JUMP"
+ },
+ {
+ "begin": 263,
+ "end": 529,
+ "name": "tag",
+ "value": "54"
+ },
+ {
+ "begin": 263,
+ "end": 529,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "POP"
+ },
+ {
+ "begin": 521,
+ "end": 526,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 514,
+ "end": 526,
+ "name": "PUSH [tag]",
+ "value": "44"
+ },
+ {
+ "begin": 514,
+ "end": 526,
+ "name": "JUMP"
+ },
+ {
+ "begin": 263,
+ "end": 529,
+ "name": "tag",
+ "value": "55"
+ },
+ {
+ "begin": 263,
+ "end": 529,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "tag",
+ "value": "52"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "POP"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "POP"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "tag",
+ "value": "43"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "AND"
+ },
+ {
+ "begin": 1351,
+ "end": 1355,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1374,
+ "end": 1381,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "SWAP4"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "DUP6"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "AND"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "tag",
+ "value": "56"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "POP"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "POP"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMP",
+ "value": "[out]"
+ }
+ ]
+ }
+ }
+ },
+ "methodIdentifiers": {
+ "allowance(address,address)": "dd62ed3e",
+ "approve(address,uint256)": "095ea7b3",
+ "balanceOf(address)": "70a08231",
+ "decimals()": "313ce567",
+ "name()": "06fdde03",
+ "symbol()": "95d89b41",
+ "totalSupply()": "18160ddd",
+ "transfer(address,uint256)": "a9059cbb",
+ "transferFrom(address,address,uint256)": "23b872dd"
+ }
+ },
+ "metadata": "{\"compiler\":{\"version\":\"0.4.11+commit.68ef5810\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"transferFrom(address,address,uint256)\":{\"details\":\"ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance.\",\"params\":{\"_from\":\"Address to transfer from.\",\"_to\":\"Address to transfer to.\",\"_value\":\"Amount to transfer.\"},\"return\":\"Success of transfer.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"2.0.0/tokens/ZRXToken/ZRXToken.sol\":\"ZRXToken\"},\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"1.0.0/ERC20Token/ERC20Token_v1.sol\":{\"keccak256\":\"0x3d710b436c430d6fe49f64b091555405360d76da6454b93faa8e213eea34a96d\",\"urls\":[\"bzzr://d12710a563415ad98ff28ecb3aab0b68467b3d023e7c130c73ed9918ef86158e\"]},\"1.0.0/Token/Token_v1.sol\":{\"keccak256\":\"0x35a82bc7bc0994caa97f8ea44660b9b5e796acfe72705b5ff7ed8f2a3c47ff37\",\"urls\":[\"bzzr://a62ae857a4cf2e8948e36d02470c612ac1a5ac20ebe1c1b553ad1ed8becb634e\"]},\"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":{\"keccak256\":\"0x2e1f4b899081cedd8940a9cd0f0f7413264c883312ed0ba9c53885766fe0a1a5\",\"urls\":[\"bzzr://47c42a58e56ffe81e49c8aabd3c391f5fa807fea299b3a2178501e3669baeb52\"]},\"2.0.0/tokens/ZRXToken/ZRXToken.sol\":{\"keccak256\":\"0x9eeb623d48909b083c77688b13b610811c53e37622b3fcbaa23c01873230f5d6\",\"urls\":[\"bzzr://84f3b5c2653068092771d443281018ff2ee0543817426d0fb6f9037a3570e37f\"]}},\"version\":1}",
+ "userdoc": {
+ "methods": {}
+ }
+ },
+ "sources": {
+ "1.0.0/ERC20Token/ERC20Token_v1.sol": {
+ "id": 0,
+ "legacyAST": {
+ "children": [
+ {
+ "attributes": {
+ "literals": [
+ "solidity",
+ "^",
+ "0.4",
+ ".11"
+ ]
+ },
+ "id": 126,
+ "name": "PragmaDirective",
+ "src": "0:24:0"
+ },
+ {
+ "attributes": {
+ "file": "../Token/Token_v1.sol"
+ },
+ "id": 128,
+ "name": "ImportDirective",
+ "src": "26:58:0"
+ },
+ {
+ "attributes": {
+ "fullyImplemented": true,
+ "isLibrary": false,
+ "linearizedBaseContracts": [
+ 322,
+ 397
+ ],
+ "name": "ERC20Token_v1"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "name": "Token"
+ },
+ "id": 129,
+ "name": "UserDefinedTypeName",
+ "src": "112:5:0"
+ }
+ ],
+ "id": 130,
+ "name": "InheritanceSpecifier",
+ "src": "112:5:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "transfer",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_to",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 131,
+ "name": "ElementaryTypeName",
+ "src": "143:7:0"
+ }
+ ],
+ "id": 132,
+ "name": "VariableDeclaration",
+ "src": "143:11:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 133,
+ "name": "ElementaryTypeName",
+ "src": "156:4:0"
+ }
+ ],
+ "id": 134,
+ "name": "VariableDeclaration",
+ "src": "156:11:0"
+ }
+ ],
+ "id": 135,
+ "name": "ParameterList",
+ "src": "142:26:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "",
+ "storageLocation": "default",
+ "type": "bool",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "bool"
+ },
+ "id": 136,
+ "name": "ElementaryTypeName",
+ "src": "178:4:0"
+ }
+ ],
+ "id": 137,
+ "name": "VariableDeclaration",
+ "src": "178:4:0"
+ }
+ ],
+ "id": 138,
+ "name": "ParameterList",
+ "src": "177:6:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "&&",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 139,
+ "name": "Identifier",
+ "src": "267:8:0"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 140,
+ "name": "Identifier",
+ "src": "276:3:0"
+ }
+ ],
+ "id": 141,
+ "name": "MemberAccess",
+ "src": "276:10:0"
+ }
+ ],
+ "id": 142,
+ "name": "IndexAccess",
+ "src": "267:20:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 143,
+ "name": "Identifier",
+ "src": "291:6:0"
+ }
+ ],
+ "id": 144,
+ "name": "BinaryOperation",
+ "src": "267:30:0"
+ },
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": "+",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 145,
+ "name": "Identifier",
+ "src": "301:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 146,
+ "name": "Identifier",
+ "src": "310:3:0"
+ }
+ ],
+ "id": 147,
+ "name": "IndexAccess",
+ "src": "301:13:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 148,
+ "name": "Identifier",
+ "src": "317:6:0"
+ }
+ ],
+ "id": 149,
+ "name": "BinaryOperation",
+ "src": "301:22:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 150,
+ "name": "Identifier",
+ "src": "327:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 151,
+ "name": "Identifier",
+ "src": "336:3:0"
+ }
+ ],
+ "id": 152,
+ "name": "IndexAccess",
+ "src": "327:13:0"
+ }
+ ],
+ "id": 153,
+ "name": "BinaryOperation",
+ "src": "301:39:0"
+ }
+ ],
+ "id": 154,
+ "name": "BinaryOperation",
+ "src": "267:73:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "-=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 155,
+ "name": "Identifier",
+ "src": "356:8:0"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 156,
+ "name": "Identifier",
+ "src": "365:3:0"
+ }
+ ],
+ "id": 157,
+ "name": "MemberAccess",
+ "src": "365:10:0"
+ }
+ ],
+ "id": 158,
+ "name": "IndexAccess",
+ "src": "356:20:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 159,
+ "name": "Identifier",
+ "src": "380:6:0"
+ }
+ ],
+ "id": 160,
+ "name": "Assignment",
+ "src": "356:30:0"
+ }
+ ],
+ "id": 161,
+ "name": "ExpressionStatement",
+ "src": "356:30:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "+=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 162,
+ "name": "Identifier",
+ "src": "400:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 163,
+ "name": "Identifier",
+ "src": "409:3:0"
+ }
+ ],
+ "id": 164,
+ "name": "IndexAccess",
+ "src": "400:13:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 165,
+ "name": "Identifier",
+ "src": "417:6:0"
+ }
+ ],
+ "id": 166,
+ "name": "Assignment",
+ "src": "400:23:0"
+ }
+ ],
+ "id": 167,
+ "name": "ExpressionStatement",
+ "src": "400:23:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "type": "tuple()",
+ "type_conversion": false
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "function (address,address,uint256) constant",
+ "value": "Transfer"
+ },
+ "id": 168,
+ "name": "Identifier",
+ "src": "437:8:0"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 169,
+ "name": "Identifier",
+ "src": "446:3:0"
+ }
+ ],
+ "id": 170,
+ "name": "MemberAccess",
+ "src": "446:10:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 171,
+ "name": "Identifier",
+ "src": "458:3:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 172,
+ "name": "Identifier",
+ "src": "463:6:0"
+ }
+ ],
+ "id": 173,
+ "name": "FunctionCall",
+ "src": "437:33:0"
+ }
+ ],
+ "id": 174,
+ "name": "ExpressionStatement",
+ "src": "437:33:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "74727565",
+ "subdenomination": null,
+ "token": "true",
+ "type": "bool",
+ "value": "true"
+ },
+ "id": 175,
+ "name": "Literal",
+ "src": "491:4:0"
+ }
+ ],
+ "id": 176,
+ "name": "Return",
+ "src": "484:11:0"
+ }
+ ],
+ "id": 177,
+ "name": "Block",
+ "src": "342:164:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "66616c7365",
+ "subdenomination": null,
+ "token": "false",
+ "type": "bool",
+ "value": "false"
+ },
+ "id": 178,
+ "name": "Literal",
+ "src": "521:5:0"
+ }
+ ],
+ "id": 179,
+ "name": "Return",
+ "src": "514:12:0"
+ }
+ ],
+ "id": 180,
+ "name": "Block",
+ "src": "512:17:0"
+ }
+ ],
+ "id": 181,
+ "name": "IfStatement",
+ "src": "263:266:0"
+ }
+ ],
+ "id": 182,
+ "name": "Block",
+ "src": "184:351:0"
+ }
+ ],
+ "id": 183,
+ "name": "FunctionDefinition",
+ "src": "125:410:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "transferFrom",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_from",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 184,
+ "name": "ElementaryTypeName",
+ "src": "563:7:0"
+ }
+ ],
+ "id": 185,
+ "name": "VariableDeclaration",
+ "src": "563:13:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_to",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 186,
+ "name": "ElementaryTypeName",
+ "src": "578:7:0"
+ }
+ ],
+ "id": 187,
+ "name": "VariableDeclaration",
+ "src": "578:11:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 188,
+ "name": "ElementaryTypeName",
+ "src": "591:4:0"
+ }
+ ],
+ "id": 189,
+ "name": "VariableDeclaration",
+ "src": "591:11:0"
+ }
+ ],
+ "id": 190,
+ "name": "ParameterList",
+ "src": "562:41:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "",
+ "storageLocation": "default",
+ "type": "bool",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "bool"
+ },
+ "id": 191,
+ "name": "ElementaryTypeName",
+ "src": "613:4:0"
+ }
+ ],
+ "id": 192,
+ "name": "VariableDeclaration",
+ "src": "613:4:0"
+ }
+ ],
+ "id": 193,
+ "name": "ParameterList",
+ "src": "612:6:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "&&",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": "&&",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 194,
+ "name": "Identifier",
+ "src": "633:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 195,
+ "name": "Identifier",
+ "src": "642:5:0"
+ }
+ ],
+ "id": 196,
+ "name": "IndexAccess",
+ "src": "633:15:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 197,
+ "name": "Identifier",
+ "src": "652:6:0"
+ }
+ ],
+ "id": 198,
+ "name": "BinaryOperation",
+ "src": "633:25:0"
+ },
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => mapping(address => uint256))",
+ "value": "allowed"
+ },
+ "id": 199,
+ "name": "Identifier",
+ "src": "662:7:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 200,
+ "name": "Identifier",
+ "src": "670:5:0"
+ }
+ ],
+ "id": 201,
+ "name": "IndexAccess",
+ "src": "662:14:0"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 202,
+ "name": "Identifier",
+ "src": "677:3:0"
+ }
+ ],
+ "id": 203,
+ "name": "MemberAccess",
+ "src": "677:10:0"
+ }
+ ],
+ "id": 204,
+ "name": "IndexAccess",
+ "src": "662:26:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 205,
+ "name": "Identifier",
+ "src": "692:6:0"
+ }
+ ],
+ "id": 206,
+ "name": "BinaryOperation",
+ "src": "662:36:0"
+ }
+ ],
+ "id": 207,
+ "name": "BinaryOperation",
+ "src": "633:65:0"
+ },
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": "+",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 208,
+ "name": "Identifier",
+ "src": "702:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 209,
+ "name": "Identifier",
+ "src": "711:3:0"
+ }
+ ],
+ "id": 210,
+ "name": "IndexAccess",
+ "src": "702:13:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 211,
+ "name": "Identifier",
+ "src": "718:6:0"
+ }
+ ],
+ "id": 212,
+ "name": "BinaryOperation",
+ "src": "702:22:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 213,
+ "name": "Identifier",
+ "src": "728:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 214,
+ "name": "Identifier",
+ "src": "737:3:0"
+ }
+ ],
+ "id": 215,
+ "name": "IndexAccess",
+ "src": "728:13:0"
+ }
+ ],
+ "id": 216,
+ "name": "BinaryOperation",
+ "src": "702:39:0"
+ }
+ ],
+ "id": 217,
+ "name": "BinaryOperation",
+ "src": "633:108:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "+=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 218,
+ "name": "Identifier",
+ "src": "757:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 219,
+ "name": "Identifier",
+ "src": "766:3:0"
+ }
+ ],
+ "id": 220,
+ "name": "IndexAccess",
+ "src": "757:13:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 221,
+ "name": "Identifier",
+ "src": "774:6:0"
+ }
+ ],
+ "id": 222,
+ "name": "Assignment",
+ "src": "757:23:0"
+ }
+ ],
+ "id": 223,
+ "name": "ExpressionStatement",
+ "src": "757:23:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "-=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 224,
+ "name": "Identifier",
+ "src": "794:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 225,
+ "name": "Identifier",
+ "src": "803:5:0"
+ }
+ ],
+ "id": 226,
+ "name": "IndexAccess",
+ "src": "794:15:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 227,
+ "name": "Identifier",
+ "src": "813:6:0"
+ }
+ ],
+ "id": 228,
+ "name": "Assignment",
+ "src": "794:25:0"
+ }
+ ],
+ "id": 229,
+ "name": "ExpressionStatement",
+ "src": "794:25:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "-=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => mapping(address => uint256))",
+ "value": "allowed"
+ },
+ "id": 230,
+ "name": "Identifier",
+ "src": "833:7:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 231,
+ "name": "Identifier",
+ "src": "841:5:0"
+ }
+ ],
+ "id": 234,
+ "name": "IndexAccess",
+ "src": "833:14:0"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 232,
+ "name": "Identifier",
+ "src": "848:3:0"
+ }
+ ],
+ "id": 233,
+ "name": "MemberAccess",
+ "src": "848:10:0"
+ }
+ ],
+ "id": 235,
+ "name": "IndexAccess",
+ "src": "833:26:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 236,
+ "name": "Identifier",
+ "src": "863:6:0"
+ }
+ ],
+ "id": 237,
+ "name": "Assignment",
+ "src": "833:36:0"
+ }
+ ],
+ "id": 238,
+ "name": "ExpressionStatement",
+ "src": "833:36:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "type": "tuple()",
+ "type_conversion": false
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "function (address,address,uint256) constant",
+ "value": "Transfer"
+ },
+ "id": 239,
+ "name": "Identifier",
+ "src": "883:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 240,
+ "name": "Identifier",
+ "src": "892:5:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 241,
+ "name": "Identifier",
+ "src": "899:3:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 242,
+ "name": "Identifier",
+ "src": "904:6:0"
+ }
+ ],
+ "id": 243,
+ "name": "FunctionCall",
+ "src": "883:28:0"
+ }
+ ],
+ "id": 244,
+ "name": "ExpressionStatement",
+ "src": "883:28:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "74727565",
+ "subdenomination": null,
+ "token": "true",
+ "type": "bool",
+ "value": "true"
+ },
+ "id": 245,
+ "name": "Literal",
+ "src": "932:4:0"
+ }
+ ],
+ "id": 246,
+ "name": "Return",
+ "src": "925:11:0"
+ }
+ ],
+ "id": 247,
+ "name": "Block",
+ "src": "743:204:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "66616c7365",
+ "subdenomination": null,
+ "token": "false",
+ "type": "bool",
+ "value": "false"
+ },
+ "id": 248,
+ "name": "Literal",
+ "src": "962:5:0"
+ }
+ ],
+ "id": 249,
+ "name": "Return",
+ "src": "955:12:0"
+ }
+ ],
+ "id": 250,
+ "name": "Block",
+ "src": "953:17:0"
+ }
+ ],
+ "id": 251,
+ "name": "IfStatement",
+ "src": "629:341:0"
+ }
+ ],
+ "id": 252,
+ "name": "Block",
+ "src": "619:357:0"
+ }
+ ],
+ "id": 253,
+ "name": "FunctionDefinition",
+ "src": "541:435:0"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "balanceOf",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_owner",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 254,
+ "name": "ElementaryTypeName",
+ "src": "1001:7:0"
+ }
+ ],
+ "id": 255,
+ "name": "VariableDeclaration",
+ "src": "1001:14:0"
+ }
+ ],
+ "id": 256,
+ "name": "ParameterList",
+ "src": "1000:16:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 257,
+ "name": "ElementaryTypeName",
+ "src": "1035:4:0"
+ }
+ ],
+ "id": 258,
+ "name": "VariableDeclaration",
+ "src": "1035:4:0"
+ }
+ ],
+ "id": 259,
+ "name": "ParameterList",
+ "src": "1034:6:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 260,
+ "name": "Identifier",
+ "src": "1058:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_owner"
+ },
+ "id": 261,
+ "name": "Identifier",
+ "src": "1067:6:0"
+ }
+ ],
+ "id": 262,
+ "name": "IndexAccess",
+ "src": "1058:16:0"
+ }
+ ],
+ "id": 263,
+ "name": "Return",
+ "src": "1051:23:0"
+ }
+ ],
+ "id": 264,
+ "name": "Block",
+ "src": "1041:40:0"
+ }
+ ],
+ "id": 265,
+ "name": "FunctionDefinition",
+ "src": "982:99:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "approve",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_spender",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 266,
+ "name": "ElementaryTypeName",
+ "src": "1104:7:0"
+ }
+ ],
+ "id": 267,
+ "name": "VariableDeclaration",
+ "src": "1104:16:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 268,
+ "name": "ElementaryTypeName",
+ "src": "1122:4:0"
+ }
+ ],
+ "id": 269,
+ "name": "VariableDeclaration",
+ "src": "1122:11:0"
+ }
+ ],
+ "id": 270,
+ "name": "ParameterList",
+ "src": "1103:31:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "",
+ "storageLocation": "default",
+ "type": "bool",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "bool"
+ },
+ "id": 271,
+ "name": "ElementaryTypeName",
+ "src": "1144:4:0"
+ }
+ ],
+ "id": 272,
+ "name": "VariableDeclaration",
+ "src": "1144:4:0"
+ }
+ ],
+ "id": 273,
+ "name": "ParameterList",
+ "src": "1143:6:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => mapping(address => uint256))",
+ "value": "allowed"
+ },
+ "id": 274,
+ "name": "Identifier",
+ "src": "1160:7:0"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 275,
+ "name": "Identifier",
+ "src": "1168:3:0"
+ }
+ ],
+ "id": 276,
+ "name": "MemberAccess",
+ "src": "1168:10:0"
+ }
+ ],
+ "id": 278,
+ "name": "IndexAccess",
+ "src": "1160:19:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_spender"
+ },
+ "id": 277,
+ "name": "Identifier",
+ "src": "1180:8:0"
+ }
+ ],
+ "id": 279,
+ "name": "IndexAccess",
+ "src": "1160:29:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 280,
+ "name": "Identifier",
+ "src": "1192:6:0"
+ }
+ ],
+ "id": 281,
+ "name": "Assignment",
+ "src": "1160:38:0"
+ }
+ ],
+ "id": 282,
+ "name": "ExpressionStatement",
+ "src": "1160:38:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "type": "tuple()",
+ "type_conversion": false
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "function (address,address,uint256) constant",
+ "value": "Approval"
+ },
+ "id": 283,
+ "name": "Identifier",
+ "src": "1208:8:0"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 284,
+ "name": "Identifier",
+ "src": "1217:3:0"
+ }
+ ],
+ "id": 285,
+ "name": "MemberAccess",
+ "src": "1217:10:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_spender"
+ },
+ "id": 286,
+ "name": "Identifier",
+ "src": "1229:8:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 287,
+ "name": "Identifier",
+ "src": "1239:6:0"
+ }
+ ],
+ "id": 288,
+ "name": "FunctionCall",
+ "src": "1208:38:0"
+ }
+ ],
+ "id": 289,
+ "name": "ExpressionStatement",
+ "src": "1208:38:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "74727565",
+ "subdenomination": null,
+ "token": "true",
+ "type": "bool",
+ "value": "true"
+ },
+ "id": 290,
+ "name": "Literal",
+ "src": "1263:4:0"
+ }
+ ],
+ "id": 291,
+ "name": "Return",
+ "src": "1256:11:0"
+ }
+ ],
+ "id": 292,
+ "name": "Block",
+ "src": "1150:124:0"
+ }
+ ],
+ "id": 293,
+ "name": "FunctionDefinition",
+ "src": "1087:187:0"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "allowance",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_owner",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 294,
+ "name": "ElementaryTypeName",
+ "src": "1299:7:0"
+ }
+ ],
+ "id": 295,
+ "name": "VariableDeclaration",
+ "src": "1299:14:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_spender",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 296,
+ "name": "ElementaryTypeName",
+ "src": "1315:7:0"
+ }
+ ],
+ "id": 297,
+ "name": "VariableDeclaration",
+ "src": "1315:16:0"
+ }
+ ],
+ "id": 298,
+ "name": "ParameterList",
+ "src": "1298:34:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 299,
+ "name": "ElementaryTypeName",
+ "src": "1351:4:0"
+ }
+ ],
+ "id": 300,
+ "name": "VariableDeclaration",
+ "src": "1351:4:0"
+ }
+ ],
+ "id": 301,
+ "name": "ParameterList",
+ "src": "1350:6:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => mapping(address => uint256))",
+ "value": "allowed"
+ },
+ "id": 302,
+ "name": "Identifier",
+ "src": "1374:7:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_owner"
+ },
+ "id": 303,
+ "name": "Identifier",
+ "src": "1382:6:0"
+ }
+ ],
+ "id": 304,
+ "name": "IndexAccess",
+ "src": "1374:15:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_spender"
+ },
+ "id": 305,
+ "name": "Identifier",
+ "src": "1390:8:0"
+ }
+ ],
+ "id": 306,
+ "name": "IndexAccess",
+ "src": "1374:25:0"
+ }
+ ],
+ "id": 307,
+ "name": "Return",
+ "src": "1367:32:0"
+ }
+ ],
+ "id": 308,
+ "name": "Block",
+ "src": "1357:49:0"
+ }
+ ],
+ "id": 309,
+ "name": "FunctionDefinition",
+ "src": "1280:126:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "balances",
+ "storageLocation": "default",
+ "type": "mapping(address => uint256)",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 310,
+ "name": "ElementaryTypeName",
+ "src": "1421:7:0"
+ },
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 311,
+ "name": "ElementaryTypeName",
+ "src": "1432:4:0"
+ }
+ ],
+ "id": 312,
+ "name": "Mapping",
+ "src": "1412:25:0"
+ }
+ ],
+ "id": 313,
+ "name": "VariableDeclaration",
+ "src": "1412:34:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "allowed",
+ "storageLocation": "default",
+ "type": "mapping(address => mapping(address => uint256))",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 314,
+ "name": "ElementaryTypeName",
+ "src": "1461:7:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 315,
+ "name": "ElementaryTypeName",
+ "src": "1481:7:0"
+ },
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 316,
+ "name": "ElementaryTypeName",
+ "src": "1492:4:0"
+ }
+ ],
+ "id": 317,
+ "name": "Mapping",
+ "src": "1472:25:0"
+ }
+ ],
+ "id": 318,
+ "name": "Mapping",
+ "src": "1452:46:0"
+ }
+ ],
+ "id": 319,
+ "name": "VariableDeclaration",
+ "src": "1452:54:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "totalSupply",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 320,
+ "name": "ElementaryTypeName",
+ "src": "1512:4:0"
+ }
+ ],
+ "id": 321,
+ "name": "VariableDeclaration",
+ "src": "1512:23:0"
+ }
+ ],
+ "id": 322,
+ "name": "ContractDefinition",
+ "src": "86:1452:0"
+ }
+ ],
+ "name": "SourceUnit"
+ }
+ },
+ "1.0.0/Token/Token_v1.sol": {
+ "id": 1,
+ "legacyAST": {
+ "children": [
+ {
+ "attributes": {
+ "literals": [
+ "solidity",
+ "^",
+ "0.4",
+ ".11"
+ ]
+ },
+ "id": 324,
+ "name": "PragmaDirective",
+ "src": "0:24:1"
+ },
+ {
+ "attributes": {
+ "fullyImplemented": true,
+ "isLibrary": false,
+ "linearizedBaseContracts": [
+ 397
+ ],
+ "name": "Token_v1"
+ },
+ "children": [
+ {
+ "attributes": {
+ "constant": true,
+ "name": "totalSupply",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [],
+ "id": 325,
+ "name": "ParameterList",
+ "src": "110:2:1"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "supply",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 326,
+ "name": "ElementaryTypeName",
+ "src": "131:4:1"
+ }
+ ],
+ "id": 327,
+ "name": "VariableDeclaration",
+ "src": "131:11:1"
+ }
+ ],
+ "id": 328,
+ "name": "ParameterList",
+ "src": "130:13:1"
+ },
+ {
+ "children": [],
+ "id": 329,
+ "name": "Block",
+ "src": "144:2:1"
+ }
+ ],
+ "id": 330,
+ "name": "FunctionDefinition",
+ "src": "90:56:1"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "balanceOf",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_owner",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 331,
+ "name": "ElementaryTypeName",
+ "src": "274:7:1"
+ }
+ ],
+ "id": 332,
+ "name": "VariableDeclaration",
+ "src": "274:14:1"
+ }
+ ],
+ "id": 333,
+ "name": "ParameterList",
+ "src": "273:16:1"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "balance",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 334,
+ "name": "ElementaryTypeName",
+ "src": "308:4:1"
+ }
+ ],
+ "id": 335,
+ "name": "VariableDeclaration",
+ "src": "308:12:1"
+ }
+ ],
+ "id": 336,
+ "name": "ParameterList",
+ "src": "307:14:1"
+ },
+ {
+ "children": [],
+ "id": 337,
+ "name": "Block",
+ "src": "322:2:1"
+ }
+ ],
+ "id": 338,
+ "name": "FunctionDefinition",
+ "src": "255:69:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "transfer",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_to",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 339,
+ "name": "ElementaryTypeName",
+ "src": "578:7:1"
+ }
+ ],
+ "id": 340,
+ "name": "VariableDeclaration",
+ "src": "578:11:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 341,
+ "name": "ElementaryTypeName",
+ "src": "591:4:1"
+ }
+ ],
+ "id": 342,
+ "name": "VariableDeclaration",
+ "src": "591:11:1"
+ }
+ ],
+ "id": 343,
+ "name": "ParameterList",
+ "src": "577:26:1"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "success",
+ "storageLocation": "default",
+ "type": "bool",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "bool"
+ },
+ "id": 344,
+ "name": "ElementaryTypeName",
+ "src": "613:4:1"
+ }
+ ],
+ "id": 345,
+ "name": "VariableDeclaration",
+ "src": "613:12:1"
+ }
+ ],
+ "id": 346,
+ "name": "ParameterList",
+ "src": "612:14:1"
+ },
+ {
+ "children": [],
+ "id": 347,
+ "name": "Block",
+ "src": "627:2:1"
+ }
+ ],
+ "id": 348,
+ "name": "FunctionDefinition",
+ "src": "560:69:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "transferFrom",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_from",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 349,
+ "name": "ElementaryTypeName",
+ "src": "972:7:1"
+ }
+ ],
+ "id": 350,
+ "name": "VariableDeclaration",
+ "src": "972:13:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_to",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 351,
+ "name": "ElementaryTypeName",
+ "src": "987:7:1"
+ }
+ ],
+ "id": 352,
+ "name": "VariableDeclaration",
+ "src": "987:11:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 353,
+ "name": "ElementaryTypeName",
+ "src": "1000:4:1"
+ }
+ ],
+ "id": 354,
+ "name": "VariableDeclaration",
+ "src": "1000:11:1"
+ }
+ ],
+ "id": 355,
+ "name": "ParameterList",
+ "src": "971:41:1"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "success",
+ "storageLocation": "default",
+ "type": "bool",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "bool"
+ },
+ "id": 356,
+ "name": "ElementaryTypeName",
+ "src": "1022:4:1"
+ }
+ ],
+ "id": 357,
+ "name": "VariableDeclaration",
+ "src": "1022:12:1"
+ }
+ ],
+ "id": 358,
+ "name": "ParameterList",
+ "src": "1021:14:1"
+ },
+ {
+ "children": [],
+ "id": 359,
+ "name": "Block",
+ "src": "1036:2:1"
+ }
+ ],
+ "id": 360,
+ "name": "FunctionDefinition",
+ "src": "950:88:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "approve",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_spender",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 361,
+ "name": "ElementaryTypeName",
+ "src": "1338:7:1"
+ }
+ ],
+ "id": 362,
+ "name": "VariableDeclaration",
+ "src": "1338:16:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 363,
+ "name": "ElementaryTypeName",
+ "src": "1356:4:1"
+ }
+ ],
+ "id": 364,
+ "name": "VariableDeclaration",
+ "src": "1356:11:1"
+ }
+ ],
+ "id": 365,
+ "name": "ParameterList",
+ "src": "1337:31:1"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "success",
+ "storageLocation": "default",
+ "type": "bool",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "bool"
+ },
+ "id": 366,
+ "name": "ElementaryTypeName",
+ "src": "1378:4:1"
+ }
+ ],
+ "id": 367,
+ "name": "VariableDeclaration",
+ "src": "1378:12:1"
+ }
+ ],
+ "id": 368,
+ "name": "ParameterList",
+ "src": "1377:14:1"
+ },
+ {
+ "children": [],
+ "id": 369,
+ "name": "Block",
+ "src": "1392:2:1"
+ }
+ ],
+ "id": 370,
+ "name": "FunctionDefinition",
+ "src": "1321:73:1"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "allowance",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_owner",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 371,
+ "name": "ElementaryTypeName",
+ "src": "1621:7:1"
+ }
+ ],
+ "id": 372,
+ "name": "VariableDeclaration",
+ "src": "1621:14:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_spender",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 373,
+ "name": "ElementaryTypeName",
+ "src": "1637:7:1"
+ }
+ ],
+ "id": 374,
+ "name": "VariableDeclaration",
+ "src": "1637:16:1"
+ }
+ ],
+ "id": 375,
+ "name": "ParameterList",
+ "src": "1620:34:1"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "remaining",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 376,
+ "name": "ElementaryTypeName",
+ "src": "1673:4:1"
+ }
+ ],
+ "id": 377,
+ "name": "VariableDeclaration",
+ "src": "1673:14:1"
+ }
+ ],
+ "id": 378,
+ "name": "ParameterList",
+ "src": "1672:16:1"
+ },
+ {
+ "children": [],
+ "id": 379,
+ "name": "Block",
+ "src": "1689:2:1"
+ }
+ ],
+ "id": 380,
+ "name": "FunctionDefinition",
+ "src": "1602:89:1"
+ },
+ {
+ "attributes": {
+ "name": "Transfer"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "indexed": true,
+ "name": "_from",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 381,
+ "name": "ElementaryTypeName",
+ "src": "1712:7:1"
+ }
+ ],
+ "id": 382,
+ "name": "VariableDeclaration",
+ "src": "1712:21:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "indexed": true,
+ "name": "_to",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 383,
+ "name": "ElementaryTypeName",
+ "src": "1735:7:1"
+ }
+ ],
+ "id": 384,
+ "name": "VariableDeclaration",
+ "src": "1735:19:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "indexed": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 385,
+ "name": "ElementaryTypeName",
+ "src": "1756:4:1"
+ }
+ ],
+ "id": 386,
+ "name": "VariableDeclaration",
+ "src": "1756:11:1"
+ }
+ ],
+ "id": 387,
+ "name": "ParameterList",
+ "src": "1711:57:1"
+ }
+ ],
+ "id": 388,
+ "name": "EventDefinition",
+ "src": "1697:72:1"
+ },
+ {
+ "attributes": {
+ "name": "Approval"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "indexed": true,
+ "name": "_owner",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 389,
+ "name": "ElementaryTypeName",
+ "src": "1789:7:1"
+ }
+ ],
+ "id": 390,
+ "name": "VariableDeclaration",
+ "src": "1789:22:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "indexed": true,
+ "name": "_spender",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 391,
+ "name": "ElementaryTypeName",
+ "src": "1813:7:1"
+ }
+ ],
+ "id": 392,
+ "name": "VariableDeclaration",
+ "src": "1813:24:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "indexed": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 393,
+ "name": "ElementaryTypeName",
+ "src": "1839:4:1"
+ }
+ ],
+ "id": 394,
+ "name": "VariableDeclaration",
+ "src": "1839:11:1"
+ }
+ ],
+ "id": 395,
+ "name": "ParameterList",
+ "src": "1788:63:1"
+ }
+ ],
+ "id": 396,
+ "name": "EventDefinition",
+ "src": "1774:78:1"
+ }
+ ],
+ "id": 397,
+ "name": "ContractDefinition",
+ "src": "26:1828:1"
+ }
+ ],
+ "name": "SourceUnit"
+ }
+ },
+ "1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol": {
+ "id": 2,
+ "legacyAST": {
+ "children": [
+ {
+ "attributes": {
+ "literals": [
+ "solidity",
+ "^",
+ "0.4",
+ ".11"
+ ]
+ },
+ "id": 33,
+ "name": "PragmaDirective",
+ "src": "580:24:2"
+ },
+ {
+ "attributes": {
+ "file": "../ERC20Token/ERC20Token_v1.sol"
+ },
+ "id": 35,
+ "name": "ImportDirective",
+ "src": "606:78:2"
+ },
+ {
+ "attributes": {
+ "fullyImplemented": true,
+ "isLibrary": false,
+ "linearizedBaseContracts": [
+ 124,
+ 322,
+ 397
+ ],
+ "name": "UnlimitedAllowanceToken_v1"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "name": "ERC20Token"
+ },
+ "id": 36,
+ "name": "UserDefinedTypeName",
+ "src": "725:10:2"
+ }
+ ],
+ "id": 37,
+ "name": "InheritanceSpecifier",
+ "src": "725:10:2"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "MAX_UINT",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 38,
+ "name": "ElementaryTypeName",
+ "src": "743:4:2"
+ },
+ {
+ "attributes": {
+ "operator": "-",
+ "type": "int_const 115792089237316195423570985008687907853269984665640564039457584007913129639935"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": "**",
+ "type": "int_const 115792089237316195423570985008687907853269984665640564039457584007913129639936"
+ },
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "32",
+ "subdenomination": null,
+ "token": null,
+ "type": "int_const 2",
+ "value": "2"
+ },
+ "id": 39,
+ "name": "Literal",
+ "src": "768:1:2"
+ },
+ {
+ "attributes": {
+ "hexvalue": "323536",
+ "subdenomination": null,
+ "token": null,
+ "type": "int_const 256",
+ "value": "256"
+ },
+ "id": 40,
+ "name": "Literal",
+ "src": "771:3:2"
+ }
+ ],
+ "id": 41,
+ "name": "BinaryOperation",
+ "src": "768:6:2"
+ },
+ {
+ "attributes": {
+ "hexvalue": "31",
+ "subdenomination": null,
+ "token": null,
+ "type": "int_const 1",
+ "value": "1"
+ },
+ "id": 42,
+ "name": "Literal",
+ "src": "777:1:2"
+ }
+ ],
+ "id": 43,
+ "name": "BinaryOperation",
+ "src": "768:10:2"
+ }
+ ],
+ "id": 44,
+ "name": "VariableDeclaration",
+ "src": "743:35:2"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "transferFrom",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_from",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 45,
+ "name": "ElementaryTypeName",
+ "src": "1088:7:2"
+ }
+ ],
+ "id": 46,
+ "name": "VariableDeclaration",
+ "src": "1088:13:2"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_to",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 47,
+ "name": "ElementaryTypeName",
+ "src": "1103:7:2"
+ }
+ ],
+ "id": 48,
+ "name": "VariableDeclaration",
+ "src": "1103:11:2"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 49,
+ "name": "ElementaryTypeName",
+ "src": "1116:4:2"
+ }
+ ],
+ "id": 50,
+ "name": "VariableDeclaration",
+ "src": "1116:11:2"
+ }
+ ],
+ "id": 51,
+ "name": "ParameterList",
+ "src": "1087:41:2"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "",
+ "storageLocation": "default",
+ "type": "bool",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "bool"
+ },
+ "id": 52,
+ "name": "ElementaryTypeName",
+ "src": "1161:4:2"
+ }
+ ],
+ "id": 53,
+ "name": "VariableDeclaration",
+ "src": "1161:4:2"
+ }
+ ],
+ "id": 54,
+ "name": "ParameterList",
+ "src": "1160:6:2"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "allowance",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 55,
+ "name": "ElementaryTypeName",
+ "src": "1181:4:2"
+ }
+ ],
+ "id": 56,
+ "name": "VariableDeclaration",
+ "src": "1181:14:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => mapping(address => uint256))",
+ "value": "allowed"
+ },
+ "id": 57,
+ "name": "Identifier",
+ "src": "1198:7:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 58,
+ "name": "Identifier",
+ "src": "1206:5:2"
+ }
+ ],
+ "id": 59,
+ "name": "IndexAccess",
+ "src": "1198:14:2"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 60,
+ "name": "Identifier",
+ "src": "1213:3:2"
+ }
+ ],
+ "id": 61,
+ "name": "MemberAccess",
+ "src": "1213:10:2"
+ }
+ ],
+ "id": 62,
+ "name": "IndexAccess",
+ "src": "1198:26:2"
+ }
+ ],
+ "id": 63,
+ "name": "VariableDeclarationStatement",
+ "src": "1181:43:2"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "&&",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": "&&",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 64,
+ "name": "Identifier",
+ "src": "1238:8:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 65,
+ "name": "Identifier",
+ "src": "1247:5:2"
+ }
+ ],
+ "id": 66,
+ "name": "IndexAccess",
+ "src": "1238:15:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 67,
+ "name": "Identifier",
+ "src": "1257:6:2"
+ }
+ ],
+ "id": 68,
+ "name": "BinaryOperation",
+ "src": "1238:25:2"
+ },
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "allowance"
+ },
+ "id": 69,
+ "name": "Identifier",
+ "src": "1279:9:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 70,
+ "name": "Identifier",
+ "src": "1292:6:2"
+ }
+ ],
+ "id": 71,
+ "name": "BinaryOperation",
+ "src": "1279:19:2"
+ }
+ ],
+ "id": 72,
+ "name": "BinaryOperation",
+ "src": "1238:60:2"
+ },
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": "+",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 73,
+ "name": "Identifier",
+ "src": "1314:8:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 74,
+ "name": "Identifier",
+ "src": "1323:3:2"
+ }
+ ],
+ "id": 75,
+ "name": "IndexAccess",
+ "src": "1314:13:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 76,
+ "name": "Identifier",
+ "src": "1330:6:2"
+ }
+ ],
+ "id": 77,
+ "name": "BinaryOperation",
+ "src": "1314:22:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 78,
+ "name": "Identifier",
+ "src": "1340:8:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 79,
+ "name": "Identifier",
+ "src": "1349:3:2"
+ }
+ ],
+ "id": 80,
+ "name": "IndexAccess",
+ "src": "1340:13:2"
+ }
+ ],
+ "id": 81,
+ "name": "BinaryOperation",
+ "src": "1314:39:2"
+ }
+ ],
+ "id": 82,
+ "name": "BinaryOperation",
+ "src": "1238:115:2"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "+=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 83,
+ "name": "Identifier",
+ "src": "1378:8:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 84,
+ "name": "Identifier",
+ "src": "1387:3:2"
+ }
+ ],
+ "id": 85,
+ "name": "IndexAccess",
+ "src": "1378:13:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 86,
+ "name": "Identifier",
+ "src": "1395:6:2"
+ }
+ ],
+ "id": 87,
+ "name": "Assignment",
+ "src": "1378:23:2"
+ }
+ ],
+ "id": 88,
+ "name": "ExpressionStatement",
+ "src": "1378:23:2"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "-=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 89,
+ "name": "Identifier",
+ "src": "1415:8:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 90,
+ "name": "Identifier",
+ "src": "1424:5:2"
+ }
+ ],
+ "id": 91,
+ "name": "IndexAccess",
+ "src": "1415:15:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 92,
+ "name": "Identifier",
+ "src": "1434:6:2"
+ }
+ ],
+ "id": 93,
+ "name": "Assignment",
+ "src": "1415:25:2"
+ }
+ ],
+ "id": 94,
+ "name": "ExpressionStatement",
+ "src": "1415:25:2"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "<",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "allowance"
+ },
+ "id": 95,
+ "name": "Identifier",
+ "src": "1458:9:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "MAX_UINT"
+ },
+ "id": 96,
+ "name": "Identifier",
+ "src": "1470:8:2"
+ }
+ ],
+ "id": 97,
+ "name": "BinaryOperation",
+ "src": "1458:20:2"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "-=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => mapping(address => uint256))",
+ "value": "allowed"
+ },
+ "id": 98,
+ "name": "Identifier",
+ "src": "1498:7:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 99,
+ "name": "Identifier",
+ "src": "1506:5:2"
+ }
+ ],
+ "id": 102,
+ "name": "IndexAccess",
+ "src": "1498:14:2"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 100,
+ "name": "Identifier",
+ "src": "1513:3:2"
+ }
+ ],
+ "id": 101,
+ "name": "MemberAccess",
+ "src": "1513:10:2"
+ }
+ ],
+ "id": 103,
+ "name": "IndexAccess",
+ "src": "1498:26:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 104,
+ "name": "Identifier",
+ "src": "1528:6:2"
+ }
+ ],
+ "id": 105,
+ "name": "Assignment",
+ "src": "1498:36:2"
+ }
+ ],
+ "id": 106,
+ "name": "ExpressionStatement",
+ "src": "1498:36:2"
+ }
+ ],
+ "id": 107,
+ "name": "Block",
+ "src": "1480:69:2"
+ }
+ ],
+ "id": 108,
+ "name": "IfStatement",
+ "src": "1454:95:2"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "type": "tuple()",
+ "type_conversion": false
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "function (address,address,uint256) constant",
+ "value": "Transfer"
+ },
+ "id": 109,
+ "name": "Identifier",
+ "src": "1562:8:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 110,
+ "name": "Identifier",
+ "src": "1571:5:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 111,
+ "name": "Identifier",
+ "src": "1578:3:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 112,
+ "name": "Identifier",
+ "src": "1583:6:2"
+ }
+ ],
+ "id": 113,
+ "name": "FunctionCall",
+ "src": "1562:28:2"
+ }
+ ],
+ "id": 114,
+ "name": "ExpressionStatement",
+ "src": "1562:28:2"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "74727565",
+ "subdenomination": null,
+ "token": "true",
+ "type": "bool",
+ "value": "true"
+ },
+ "id": 115,
+ "name": "Literal",
+ "src": "1611:4:2"
+ }
+ ],
+ "id": 116,
+ "name": "Return",
+ "src": "1604:11:2"
+ }
+ ],
+ "id": 117,
+ "name": "Block",
+ "src": "1364:262:2"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "66616c7365",
+ "subdenomination": null,
+ "token": "false",
+ "type": "bool",
+ "value": "false"
+ },
+ "id": 118,
+ "name": "Literal",
+ "src": "1653:5:2"
+ }
+ ],
+ "id": 119,
+ "name": "Return",
+ "src": "1646:12:2"
+ }
+ ],
+ "id": 120,
+ "name": "Block",
+ "src": "1632:37:2"
+ }
+ ],
+ "id": 121,
+ "name": "IfStatement",
+ "src": "1234:435:2"
+ }
+ ],
+ "id": 122,
+ "name": "Block",
+ "src": "1171:504:2"
+ }
+ ],
+ "id": 123,
+ "name": "FunctionDefinition",
+ "src": "1066:609:2"
+ }
+ ],
+ "id": 124,
+ "name": "ContractDefinition",
+ "src": "686:991:2"
+ }
+ ],
+ "name": "SourceUnit"
+ }
+ },
+ "2.0.0/tokens/ZRXToken/ZRXToken.sol": {
+ "id": 3,
+ "legacyAST": {
+ "children": [
+ {
+ "attributes": {
+ "literals": [
+ "solidity",
+ "0.4",
+ ".11"
+ ]
+ },
+ "id": 1,
+ "name": "PragmaDirective",
+ "src": "580:23:3"
+ },
+ {
+ "attributes": {
+ "file": "../../../1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol"
+ },
+ "id": 3,
+ "name": "ImportDirective",
+ "src": "650:142:3"
+ },
+ {
+ "attributes": {
+ "fullyImplemented": true,
+ "isLibrary": false,
+ "linearizedBaseContracts": [
+ 31,
+ 124,
+ 322,
+ 397
+ ],
+ "name": "ZRXToken"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "name": "UnlimitedAllowanceToken"
+ },
+ "id": 4,
+ "name": "UserDefinedTypeName",
+ "src": "816:23:3"
+ }
+ ],
+ "id": 5,
+ "name": "InheritanceSpecifier",
+ "src": "816:23:3"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "decimals",
+ "storageLocation": "default",
+ "type": "uint8",
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint8"
+ },
+ "id": 6,
+ "name": "ElementaryTypeName",
+ "src": "891:5:3"
+ },
+ {
+ "attributes": {
+ "hexvalue": "3138",
+ "subdenomination": null,
+ "token": null,
+ "type": "int_const 18",
+ "value": "18"
+ },
+ "id": 7,
+ "name": "Literal",
+ "src": "924:2:3"
+ }
+ ],
+ "id": 8,
+ "name": "VariableDeclaration",
+ "src": "891:35:3"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "totalSupply",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 9,
+ "name": "ElementaryTypeName",
+ "src": "932:4:3"
+ },
+ {
+ "attributes": {
+ "operator": "**",
+ "type": "int_const 1000000000000000000000000000"
+ },
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "3130",
+ "subdenomination": null,
+ "token": null,
+ "type": "int_const 10",
+ "value": "10"
+ },
+ "id": 10,
+ "name": "Literal",
+ "src": "958:2:3"
+ },
+ {
+ "attributes": {
+ "hexvalue": "3237",
+ "subdenomination": null,
+ "token": null,
+ "type": "int_const 27",
+ "value": "27"
+ },
+ "id": 11,
+ "name": "Literal",
+ "src": "962:2:3"
+ }
+ ],
+ "id": 12,
+ "name": "BinaryOperation",
+ "src": "958:6:3"
+ }
+ ],
+ "id": 13,
+ "name": "VariableDeclaration",
+ "src": "932:32:3"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "name",
+ "storageLocation": "default",
+ "type": "string memory",
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "string"
+ },
+ "id": 14,
+ "name": "ElementaryTypeName",
+ "src": "1009:6:3"
+ },
+ {
+ "attributes": {
+ "hexvalue": "30782050726f746f636f6c20546f6b656e",
+ "subdenomination": null,
+ "token": null,
+ "type": "literal_string \"0x Protocol Token\"",
+ "value": "0x Protocol Token"
+ },
+ "id": 15,
+ "name": "Literal",
+ "src": "1039:19:3"
+ }
+ ],
+ "id": 16,
+ "name": "VariableDeclaration",
+ "src": "1009:49:3"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "symbol",
+ "storageLocation": "default",
+ "type": "string memory",
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "string"
+ },
+ "id": 17,
+ "name": "ElementaryTypeName",
+ "src": "1064:6:3"
+ },
+ {
+ "attributes": {
+ "hexvalue": "5a5258",
+ "subdenomination": null,
+ "token": null,
+ "type": "literal_string \"ZRX\"",
+ "value": "ZRX"
+ },
+ "id": 18,
+ "name": "Literal",
+ "src": "1096:5:3"
+ }
+ ],
+ "id": 19,
+ "name": "VariableDeclaration",
+ "src": "1064:37:3"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "ZRXToken",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [],
+ "id": 20,
+ "name": "ParameterList",
+ "src": "1167:2:3"
+ },
+ {
+ "children": [],
+ "id": 21,
+ "name": "ParameterList",
+ "src": "1189:0:3"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 22,
+ "name": "Identifier",
+ "src": "1199:8:3"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 23,
+ "name": "Identifier",
+ "src": "1208:3:3"
+ }
+ ],
+ "id": 24,
+ "name": "MemberAccess",
+ "src": "1208:10:3"
+ }
+ ],
+ "id": 25,
+ "name": "IndexAccess",
+ "src": "1199:20:3"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "totalSupply"
+ },
+ "id": 26,
+ "name": "Identifier",
+ "src": "1222:11:3"
+ }
+ ],
+ "id": 27,
+ "name": "Assignment",
+ "src": "1199:34:3"
+ }
+ ],
+ "id": 28,
+ "name": "ExpressionStatement",
+ "src": "1199:34:3"
+ }
+ ],
+ "id": 29,
+ "name": "Block",
+ "src": "1189:51:3"
+ }
+ ],
+ "id": 30,
+ "name": "FunctionDefinition",
+ "src": "1150:90:3"
+ }
+ ],
+ "id": 31,
+ "name": "ContractDefinition",
+ "src": "795:447:3"
+ }
+ ],
+ "name": "SourceUnit"
+ }
+ }
+ },
+ "sourceCodes": {
+ "1.0.0/ERC20Token/ERC20Token_v1.sol": "pragma solidity ^0.4.11;\n\nimport { Token_v1 as Token } from \"../Token/Token_v1.sol\";\n\ncontract ERC20Token_v1 is Token {\n\n function transfer(address _to, uint _value) returns (bool) {\n //Default assumes totalSupply can't be over max (2^256 - 1).\n if (balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]) {\n balances[msg.sender] -= _value;\n balances[_to] += _value;\n Transfer(msg.sender, _to, _value);\n return true;\n } else { return false; }\n }\n\n function transferFrom(address _from, address _to, uint _value) returns (bool) {\n if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value >= balances[_to]) {\n balances[_to] += _value;\n balances[_from] -= _value;\n allowed[_from][msg.sender] -= _value;\n Transfer(_from, _to, _value);\n return true;\n } else { return false; }\n }\n\n function balanceOf(address _owner) constant returns (uint) {\n return balances[_owner];\n }\n\n function approve(address _spender, uint _value) returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n function allowance(address _owner, address _spender) constant returns (uint) {\n return allowed[_owner][_spender];\n }\n\n mapping (address => uint) balances;\n mapping (address => mapping (address => uint)) allowed;\n uint public totalSupply;\n}\n",
+ "1.0.0/Token/Token_v1.sol": "pragma solidity ^0.4.11;\n\ncontract Token_v1 {\n\n /// @return total amount of tokens\n function totalSupply() constant returns (uint supply) {}\n\n /// @param _owner The address from which the balance will be retrieved\n /// @return The balance\n function balanceOf(address _owner) constant returns (uint balance) {}\n\n /// @notice send `_value` token to `_to` from `msg.sender`\n /// @param _to The address of the recipient\n /// @param _value The amount of token to be transferred\n /// @return Whether the transfer was successful or not\n function transfer(address _to, uint _value) returns (bool success) {}\n\n /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\n /// @param _from The address of the sender\n /// @param _to The address of the recipient\n /// @param _value The amount of token to be transferred\n /// @return Whether the transfer was successful or not\n function transferFrom(address _from, address _to, uint _value) returns (bool success) {}\n\n /// @notice `msg.sender` approves `_addr` to spend `_value` tokens\n /// @param _spender The address of the account able to transfer the tokens\n /// @param _value The amount of wei to be approved for transfer\n /// @return Whether the approval was successful or not\n function approve(address _spender, uint _value) returns (bool success) {}\n\n /// @param _owner The address of the account owning tokens\n /// @param _spender The address of the account able to transfer the tokens\n /// @return Amount of remaining tokens allowed to spent\n function allowance(address _owner, address _spender) constant returns (uint remaining) {}\n\n event Transfer(address indexed _from, address indexed _to, uint _value);\n event Approval(address indexed _owner, address indexed _spender, uint _value);\n}\n\n",
+ "1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol": "/*\n\n Copyright 2018 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.4.11;\n\nimport { ERC20Token_v1 as ERC20Token } from \"../ERC20Token/ERC20Token_v1.sol\";\n\ncontract UnlimitedAllowanceToken_v1 is ERC20Token {\n\n uint constant MAX_UINT = 2**256 - 1;\n\n /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance.\n /// @param _from Address to transfer from.\n /// @param _to Address to transfer to.\n /// @param _value Amount to transfer.\n /// @return Success of transfer.\n function transferFrom(address _from, address _to, uint _value)\n public\n returns (bool)\n {\n uint allowance = allowed[_from][msg.sender];\n if (balances[_from] >= _value\n && allowance >= _value\n && balances[_to] + _value >= balances[_to]\n ) {\n balances[_to] += _value;\n balances[_from] -= _value;\n if (allowance < MAX_UINT) {\n allowed[_from][msg.sender] -= _value;\n }\n Transfer(_from, _to, _value);\n return true;\n } else {\n return false;\n }\n }\n}\n",
+ "2.0.0/tokens/ZRXToken/ZRXToken.sol": "/*\n\n Copyright 2018 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity 0.4.11;\n\n// solhint-disable-next-line max-line-length\nimport { UnlimitedAllowanceToken_v1 as UnlimitedAllowanceToken } from \"../../../1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\";\n\n\ncontract ZRXToken is UnlimitedAllowanceToken {\n\n // solhint-disable const-name-snakecase\n uint8 constant public decimals = 18;\n uint public totalSupply = 10**27; // 1 billion tokens, 18 decimal places\n string constant public name = \"0x Protocol Token\";\n string constant public symbol = \"ZRX\";\n // solhint-enableconst-name-snakecase\n\n function ZRXToken()\n public\n {\n balances[msg.sender] = totalSupply;\n }\n}\n"
+ },
+ "sourceTreeHashHex": "0xbcce67d129fe53ddb9717b4f567b33108c41a4f4324aa47ac609037e41f5b95d",
+ "compiler": {
+ "name": "solc",
+ "version": "soljson-v0.4.11+commit.68ef5810.js",
+ "settings": {
+ "optimizer": {
+ "enabled": true,
+ "runs": 1000000
+ },
+ "outputSelection": {
+ "*": {
+ "*": [
+ "abi",
+ "evm.bytecode.object",
+ "evm.bytecode.sourceMap",
+ "evm.deployedBytecode.object",
+ "evm.deployedBytecode.sourceMap"
+ ]
+ }
+ }
+ }
+ },
+ "networks": {
+ "50": {
+ "address": "0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c",
+ "links": {},
+ "constructorArgs": "[]"
+ }
+ }
+} \ No newline at end of file
diff --git a/packages/0x.js/src/compact_artifacts/DummyToken.json b/packages/0x.js/src/compact_artifacts/DummyToken.json
deleted file mode 100644
index f64a8cd3d..000000000
--- a/packages/0x.js/src/compact_artifacts/DummyToken.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "contract_name": "DummyToken",
- "abi": [
- {
- "constant": false,
- "inputs": [
- {
- "name": "_target",
- "type": "address"
- },
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "setBalance",
- "outputs": [],
- "payable": false,
- "type": "function"
- }
- ]
-}
diff --git a/packages/0x.js/src/compact_artifacts/EtherToken.json b/packages/0x.js/src/compact_artifacts/EtherToken.json
deleted file mode 100644
index 26cca57cd..000000000
--- a/packages/0x.js/src/compact_artifacts/EtherToken.json
+++ /dev/null
@@ -1,287 +0,0 @@
-{
- "contract_name": "EtherToken",
- "abi": [
- {
- "constant": true,
- "inputs": [],
- "name": "name",
- "outputs": [
- {
- "name": "",
- "type": "string"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_spender",
- "type": "address"
- },
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "approve",
- "outputs": [
- {
- "name": "",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "totalSupply",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_from",
- "type": "address"
- },
- {
- "name": "_to",
- "type": "address"
- },
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "transferFrom",
- "outputs": [
- {
- "name": "",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "withdraw",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "decimals",
- "outputs": [
- {
- "name": "",
- "type": "uint8"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_owner",
- "type": "address"
- }
- ],
- "name": "balanceOf",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "symbol",
- "outputs": [
- {
- "name": "",
- "type": "string"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_to",
- "type": "address"
- },
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "transfer",
- "outputs": [
- {
- "name": "",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [],
- "name": "deposit",
- "outputs": [],
- "payable": true,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_owner",
- "type": "address"
- },
- {
- "name": "_spender",
- "type": "address"
- }
- ],
- "name": "allowance",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "payable": true,
- "type": "fallback"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_from",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_to",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Transfer",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_owner",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_spender",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Approval",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_owner",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Deposit",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_owner",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Withdrawal",
- "type": "event"
- }
- ],
- "networks": {
- "1": {
- "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
- },
- "3": {
- "address": "0xc00fd9820cd2898cc4c054b7bf142de637ad129a"
- },
- "4": {
- "address": "0xc778417e063141139fce010982780140aa0cd5ab"
- },
- "42": {
- "address": "0x653e49e301e508a13237c0ddc98ae7d4cd2667a1"
- },
- "50": {
- "address": "0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c"
- }
- }
-}
diff --git a/packages/0x.js/src/compact_artifacts/Exchange.json b/packages/0x.js/src/compact_artifacts/Exchange.json
deleted file mode 100644
index af8db7360..000000000
--- a/packages/0x.js/src/compact_artifacts/Exchange.json
+++ /dev/null
@@ -1,610 +0,0 @@
-{
- "contract_name": "Exchange",
- "abi": [
- {
- "constant": true,
- "inputs": [
- {
- "name": "numerator",
- "type": "uint256"
- },
- {
- "name": "denominator",
- "type": "uint256"
- },
- {
- "name": "target",
- "type": "uint256"
- }
- ],
- "name": "isRoundingError",
- "outputs": [
- {
- "name": "",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "",
- "type": "bytes32"
- }
- ],
- "name": "filled",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "",
- "type": "bytes32"
- }
- ],
- "name": "cancelled",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5][]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6][]"
- },
- {
- "name": "fillTakerTokenAmount",
- "type": "uint256"
- },
- {
- "name": "shouldThrowOnInsufficientBalanceOrAllowance",
- "type": "bool"
- },
- {
- "name": "v",
- "type": "uint8[]"
- },
- {
- "name": "r",
- "type": "bytes32[]"
- },
- {
- "name": "s",
- "type": "bytes32[]"
- }
- ],
- "name": "fillOrdersUpTo",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6]"
- },
- {
- "name": "cancelTakerTokenAmount",
- "type": "uint256"
- }
- ],
- "name": "cancelOrder",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "ZRX_TOKEN_CONTRACT",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5][]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6][]"
- },
- {
- "name": "fillTakerTokenAmounts",
- "type": "uint256[]"
- },
- {
- "name": "v",
- "type": "uint8[]"
- },
- {
- "name": "r",
- "type": "bytes32[]"
- },
- {
- "name": "s",
- "type": "bytes32[]"
- }
- ],
- "name": "batchFillOrKillOrders",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6]"
- },
- {
- "name": "fillTakerTokenAmount",
- "type": "uint256"
- },
- {
- "name": "v",
- "type": "uint8"
- },
- {
- "name": "r",
- "type": "bytes32"
- },
- {
- "name": "s",
- "type": "bytes32"
- }
- ],
- "name": "fillOrKillOrder",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "orderHash",
- "type": "bytes32"
- }
- ],
- "name": "getUnavailableTakerTokenAmount",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "signer",
- "type": "address"
- },
- {
- "name": "hash",
- "type": "bytes32"
- },
- {
- "name": "v",
- "type": "uint8"
- },
- {
- "name": "r",
- "type": "bytes32"
- },
- {
- "name": "s",
- "type": "bytes32"
- }
- ],
- "name": "isValidSignature",
- "outputs": [
- {
- "name": "",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "numerator",
- "type": "uint256"
- },
- {
- "name": "denominator",
- "type": "uint256"
- },
- {
- "name": "target",
- "type": "uint256"
- }
- ],
- "name": "getPartialAmount",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "TOKEN_TRANSFER_PROXY_CONTRACT",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5][]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6][]"
- },
- {
- "name": "fillTakerTokenAmounts",
- "type": "uint256[]"
- },
- {
- "name": "shouldThrowOnInsufficientBalanceOrAllowance",
- "type": "bool"
- },
- {
- "name": "v",
- "type": "uint8[]"
- },
- {
- "name": "r",
- "type": "bytes32[]"
- },
- {
- "name": "s",
- "type": "bytes32[]"
- }
- ],
- "name": "batchFillOrders",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5][]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6][]"
- },
- {
- "name": "cancelTakerTokenAmounts",
- "type": "uint256[]"
- }
- ],
- "name": "batchCancelOrders",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6]"
- },
- {
- "name": "fillTakerTokenAmount",
- "type": "uint256"
- },
- {
- "name": "shouldThrowOnInsufficientBalanceOrAllowance",
- "type": "bool"
- },
- {
- "name": "v",
- "type": "uint8"
- },
- {
- "name": "r",
- "type": "bytes32"
- },
- {
- "name": "s",
- "type": "bytes32"
- }
- ],
- "name": "fillOrder",
- "outputs": [
- {
- "name": "filledTakerTokenAmount",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6]"
- }
- ],
- "name": "getOrderHash",
- "outputs": [
- {
- "name": "",
- "type": "bytes32"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "EXTERNAL_QUERY_GAS_LIMIT",
- "outputs": [
- {
- "name": "",
- "type": "uint16"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "VERSION",
- "outputs": [
- {
- "name": "",
- "type": "string"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "_zrxToken",
- "type": "address"
- },
- {
- "name": "_tokenTransferProxy",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "constructor"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "maker",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "taker",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "feeRecipient",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "makerToken",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "takerToken",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "filledMakerTokenAmount",
- "type": "uint256"
- },
- {
- "indexed": false,
- "name": "filledTakerTokenAmount",
- "type": "uint256"
- },
- {
- "indexed": false,
- "name": "paidMakerFee",
- "type": "uint256"
- },
- {
- "indexed": false,
- "name": "paidTakerFee",
- "type": "uint256"
- },
- {
- "indexed": true,
- "name": "tokens",
- "type": "bytes32"
- },
- {
- "indexed": false,
- "name": "orderHash",
- "type": "bytes32"
- }
- ],
- "name": "LogFill",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "maker",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "feeRecipient",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "makerToken",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "takerToken",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "cancelledMakerTokenAmount",
- "type": "uint256"
- },
- {
- "indexed": false,
- "name": "cancelledTakerTokenAmount",
- "type": "uint256"
- },
- {
- "indexed": true,
- "name": "tokens",
- "type": "bytes32"
- },
- {
- "indexed": false,
- "name": "orderHash",
- "type": "bytes32"
- }
- ],
- "name": "LogCancel",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "errorId",
- "type": "uint8"
- },
- {
- "indexed": true,
- "name": "orderHash",
- "type": "bytes32"
- }
- ],
- "name": "LogError",
- "type": "event"
- }
- ],
- "networks": {
- "1": {
- "address": "0x12459c951127e0c374ff9105dda097662a027093"
- },
- "3": {
- "address": "0x479cc461fecd078f766ecc58533d6f69580cf3ac"
- },
- "4": {
- "address": "0x1d16ef40fac01cec8adac2ac49427b9384192c05"
- },
- "42": {
- "address": "0x90fe2af704b34e0224bf2299c838e04d4dcf1364"
- },
- "50": {
- "address": "0x48bacb9266a570d521063ef5dd96e61686dbe788"
- }
- }
-}
diff --git a/packages/0x.js/src/compact_artifacts/Token.json b/packages/0x.js/src/compact_artifacts/Token.json
deleted file mode 100644
index 3b5a86ae0..000000000
--- a/packages/0x.js/src/compact_artifacts/Token.json
+++ /dev/null
@@ -1,172 +0,0 @@
-{
- "contract_name": "Token",
- "abi": [
- {
- "constant": false,
- "inputs": [
- {
- "name": "_spender",
- "type": "address"
- },
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "approve",
- "outputs": [
- {
- "name": "success",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "totalSupply",
- "outputs": [
- {
- "name": "supply",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_from",
- "type": "address"
- },
- {
- "name": "_to",
- "type": "address"
- },
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "transferFrom",
- "outputs": [
- {
- "name": "success",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_owner",
- "type": "address"
- }
- ],
- "name": "balanceOf",
- "outputs": [
- {
- "name": "balance",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_to",
- "type": "address"
- },
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "transfer",
- "outputs": [
- {
- "name": "success",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_owner",
- "type": "address"
- },
- {
- "name": "_spender",
- "type": "address"
- }
- ],
- "name": "allowance",
- "outputs": [
- {
- "name": "remaining",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_from",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_to",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Transfer",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_owner",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_spender",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Approval",
- "type": "event"
- }
- ]
-}
diff --git a/packages/0x.js/src/compact_artifacts/TokenRegistry.json b/packages/0x.js/src/compact_artifacts/TokenRegistry.json
deleted file mode 100644
index 0f583628c..000000000
--- a/packages/0x.js/src/compact_artifacts/TokenRegistry.json
+++ /dev/null
@@ -1,547 +0,0 @@
-{
- "contract_name": "TokenRegistry",
- "abi": [
- {
- "constant": false,
- "inputs": [
- {
- "name": "_token",
- "type": "address"
- },
- {
- "name": "_index",
- "type": "uint256"
- }
- ],
- "name": "removeToken",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_name",
- "type": "string"
- }
- ],
- "name": "getTokenAddressByName",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_symbol",
- "type": "string"
- }
- ],
- "name": "getTokenAddressBySymbol",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_token",
- "type": "address"
- },
- {
- "name": "_swarmHash",
- "type": "bytes"
- }
- ],
- "name": "setTokenSwarmHash",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_token",
- "type": "address"
- }
- ],
- "name": "getTokenMetaData",
- "outputs": [
- {
- "name": "",
- "type": "address"
- },
- {
- "name": "",
- "type": "string"
- },
- {
- "name": "",
- "type": "string"
- },
- {
- "name": "",
- "type": "uint8"
- },
- {
- "name": "",
- "type": "bytes"
- },
- {
- "name": "",
- "type": "bytes"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "owner",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_token",
- "type": "address"
- },
- {
- "name": "_name",
- "type": "string"
- },
- {
- "name": "_symbol",
- "type": "string"
- },
- {
- "name": "_decimals",
- "type": "uint8"
- },
- {
- "name": "_ipfsHash",
- "type": "bytes"
- },
- {
- "name": "_swarmHash",
- "type": "bytes"
- }
- ],
- "name": "addToken",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_token",
- "type": "address"
- },
- {
- "name": "_name",
- "type": "string"
- }
- ],
- "name": "setTokenName",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "name": "tokens",
- "outputs": [
- {
- "name": "token",
- "type": "address"
- },
- {
- "name": "name",
- "type": "string"
- },
- {
- "name": "symbol",
- "type": "string"
- },
- {
- "name": "decimals",
- "type": "uint8"
- },
- {
- "name": "ipfsHash",
- "type": "bytes"
- },
- {
- "name": "swarmHash",
- "type": "bytes"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "name": "tokenAddresses",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_name",
- "type": "string"
- }
- ],
- "name": "getTokenByName",
- "outputs": [
- {
- "name": "",
- "type": "address"
- },
- {
- "name": "",
- "type": "string"
- },
- {
- "name": "",
- "type": "string"
- },
- {
- "name": "",
- "type": "uint8"
- },
- {
- "name": "",
- "type": "bytes"
- },
- {
- "name": "",
- "type": "bytes"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "getTokenAddresses",
- "outputs": [
- {
- "name": "",
- "type": "address[]"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_token",
- "type": "address"
- },
- {
- "name": "_ipfsHash",
- "type": "bytes"
- }
- ],
- "name": "setTokenIpfsHash",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_symbol",
- "type": "string"
- }
- ],
- "name": "getTokenBySymbol",
- "outputs": [
- {
- "name": "",
- "type": "address"
- },
- {
- "name": "",
- "type": "string"
- },
- {
- "name": "",
- "type": "string"
- },
- {
- "name": "",
- "type": "uint8"
- },
- {
- "name": "",
- "type": "bytes"
- },
- {
- "name": "",
- "type": "bytes"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_token",
- "type": "address"
- },
- {
- "name": "_symbol",
- "type": "string"
- }
- ],
- "name": "setTokenSymbol",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "transferOwnership",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "token",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "name",
- "type": "string"
- },
- {
- "indexed": false,
- "name": "symbol",
- "type": "string"
- },
- {
- "indexed": false,
- "name": "decimals",
- "type": "uint8"
- },
- {
- "indexed": false,
- "name": "ipfsHash",
- "type": "bytes"
- },
- {
- "indexed": false,
- "name": "swarmHash",
- "type": "bytes"
- }
- ],
- "name": "LogAddToken",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "token",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "name",
- "type": "string"
- },
- {
- "indexed": false,
- "name": "symbol",
- "type": "string"
- },
- {
- "indexed": false,
- "name": "decimals",
- "type": "uint8"
- },
- {
- "indexed": false,
- "name": "ipfsHash",
- "type": "bytes"
- },
- {
- "indexed": false,
- "name": "swarmHash",
- "type": "bytes"
- }
- ],
- "name": "LogRemoveToken",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "token",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "oldName",
- "type": "string"
- },
- {
- "indexed": false,
- "name": "newName",
- "type": "string"
- }
- ],
- "name": "LogTokenNameChange",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "token",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "oldSymbol",
- "type": "string"
- },
- {
- "indexed": false,
- "name": "newSymbol",
- "type": "string"
- }
- ],
- "name": "LogTokenSymbolChange",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "token",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "oldIpfsHash",
- "type": "bytes"
- },
- {
- "indexed": false,
- "name": "newIpfsHash",
- "type": "bytes"
- }
- ],
- "name": "LogTokenIpfsHashChange",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "token",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "oldSwarmHash",
- "type": "bytes"
- },
- {
- "indexed": false,
- "name": "newSwarmHash",
- "type": "bytes"
- }
- ],
- "name": "LogTokenSwarmHashChange",
- "type": "event"
- }
- ],
- "networks": {
- "1": {
- "address": "0x926a74c5c36adf004c87399e65f75628b0f98d2c"
- },
- "3": {
- "address": "0x6b1a50f0bb5a7995444bd3877b22dc89c62843ed"
- },
- "4": {
- "address": "0x4e9aad8184de8833365fea970cd9149372fdf1e6"
- },
- "42": {
- "address": "0xf18e504561f4347bea557f3d4558f559dddbae7f"
- },
- "50": {
- "address": "0x0b1ba0af832d7c05fd64161e0db78e85978e8082"
- }
- }
-}
diff --git a/packages/0x.js/src/compact_artifacts/TokenTransferProxy.json b/packages/0x.js/src/compact_artifacts/TokenTransferProxy.json
deleted file mode 100644
index 8cf551ddb..000000000
--- a/packages/0x.js/src/compact_artifacts/TokenTransferProxy.json
+++ /dev/null
@@ -1,187 +0,0 @@
-{
- "contract_name": "TokenTransferProxy",
- "abi": [
- {
- "constant": false,
- "inputs": [
- {
- "name": "token",
- "type": "address"
- },
- {
- "name": "from",
- "type": "address"
- },
- {
- "name": "to",
- "type": "address"
- },
- {
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "transferFrom",
- "outputs": [
- {
- "name": "",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "target",
- "type": "address"
- }
- ],
- "name": "addAuthorizedAddress",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "name": "authorities",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "target",
- "type": "address"
- }
- ],
- "name": "removeAuthorizedAddress",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "owner",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "name": "authorized",
- "outputs": [
- {
- "name": "",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "getAuthorizedAddresses",
- "outputs": [
- {
- "name": "",
- "type": "address[]"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "transferOwnership",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "target",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "caller",
- "type": "address"
- }
- ],
- "name": "LogAuthorizedAddressAdded",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "target",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "caller",
- "type": "address"
- }
- ],
- "name": "LogAuthorizedAddressRemoved",
- "type": "event"
- }
- ],
- "networks": {
- "1": {
- "address": "0x8da0d80f5007ef1e431dd2127178d224e32c2ef4"
- },
- "3": {
- "address": "0x4e9aad8184de8833365fea970cd9149372fdf1e6"
- },
- "4": {
- "address": "0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d"
- },
- "42": {
- "address": "0x087eed4bc1ee3de49befbd66c662b434b15d49d4"
- },
- "50": {
- "address": "0x1dc4c1cefef38a777b15aa20260a54e584b16c48"
- }
- }
-}
diff --git a/packages/0x.js/src/compact_artifacts/ZRX.json b/packages/0x.js/src/compact_artifacts/ZRX.json
deleted file mode 100644
index e40b8f268..000000000
--- a/packages/0x.js/src/compact_artifacts/ZRX.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "contract_name": "ZRX",
- "networks": {
- "1": {
- "address": "0xe41d2489571d322189246dafa5ebde1f4699f498"
- },
- "3": {
- "address": "0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d"
- },
- "4": {
- "address": "0x00f58d6d585f84b2d7267940cede30ce2fe6eae8"
- },
- "42": {
- "address": "0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570"
- },
- "50": {
- "address": "0x1d7022f5b17d2f8b695918fb48fa1089c9f85401"
- }
- }
-}
diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts
index 5c7ad6e1c..95ca07eea 100644
--- a/packages/0x.js/src/index.ts
+++ b/packages/0x.js/src/index.ts
@@ -1,32 +1,38 @@
export { ZeroEx } from './0x';
+export { MessagePrefixType, MessagePrefixOpts } from '@0xproject/order-utils';
+export { Web3ProviderEngine, RPCSubprovider } from '@0xproject/subproviders';
+
export {
- BlockParamLiteral,
- FilterObject,
- BlockParam,
- ContractEventArg,
ExchangeContractErrs,
- LogWithDecodedArgs,
Order,
- Provider,
SignedOrder,
ECSignature,
OrderStateValid,
OrderStateInvalid,
OrderState,
Token,
- TransactionReceipt,
- TransactionReceiptWithDecodedLogs,
+ ERC20AssetData,
+ ERC721AssetData,
+ AssetProxyId,
} from '@0xproject/types';
-export { OrderWatcherConfig } from '@0xproject/order-watcher';
+export {
+ BlockParamLiteral,
+ FilterObject,
+ BlockParam,
+ LogWithDecodedArgs,
+ ContractEventArg,
+ Provider,
+ TransactionReceipt,
+ TransactionReceiptWithDecodedLogs,
+} from 'ethereum-types';
export {
EventCallback,
ContractEvent,
IndexedFilterValues,
BlockRange,
- OrderCancellationRequest,
OrderFillRequest,
ContractEventArgs,
MethodOpts,
@@ -36,18 +42,25 @@ export {
DecodedLogEvent,
OnOrderStateChangeCallback,
ContractWrappersError,
- EtherTokenContractEventArgs,
- WithdrawalContractEventArgs,
- DepositContractEventArgs,
- EtherTokenEvents,
- TransferContractEventArgs,
- ApprovalContractEventArgs,
- TokenContractEventArgs,
- TokenEvents,
- LogErrorContractEventArgs,
- LogCancelContractEventArgs,
- LogFillContractEventArgs,
- ExchangeContractEventArgs,
- ExchangeEvents,
+ WETH9Events,
+ WETH9WithdrawalEventArgs,
+ WETH9ApprovalEventArgs,
+ WETH9EventArgs,
+ WETH9DepositEventArgs,
+ WETH9TransferEventArgs,
+ ERC20TokenTransferEventArgs,
+ ERC20TokenApprovalEventArgs,
+ ERC20TokenEvents,
+ ERC20TokenEventArgs,
+ ERC721TokenApprovalEventArgs,
+ ERC721TokenApprovalForAllEventArgs,
+ ERC721TokenTransferEventArgs,
+ ERC721TokenEvents,
+ ExchangeCancelUpToEventArgs,
+ ExchangeAssetProxyRegisteredEventArgs,
+ ExchangeFillEventArgs,
+ ExchangeCancelEventArgs,
+ ExchangeEventArgs,
ContractWrappersConfig,
+ OrderInfo,
} from '@0xproject/contract-wrappers';
diff --git a/packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts b/packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts
index f7f649a6d..378b86e77 100644
--- a/packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts
+++ b/packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts
@@ -8,8 +8,8 @@ export const zeroExPrivateNetworkConfigSchema = {
gasPrice: { $ref: '/Number' },
zrxContractAddress: { $ref: '/Address' },
exchangeContractAddress: { $ref: '/Address' },
- tokenRegistryContractAddress: { $ref: '/Address' },
- tokenTransferProxyContractAddress: { $ref: '/Address' },
+ erc20ProxyContractAddress: { $ref: '/Address' },
+ erc721ProxyContractAddress: { $ref: '/Address' },
orderWatcherConfig: {
type: 'object',
properties: {
@@ -29,7 +29,7 @@ export const zeroExPrivateNetworkConfigSchema = {
'networkId',
'zrxContractAddress',
'exchangeContractAddress',
- 'tokenRegistryContractAddress',
- 'tokenTransferProxyContractAddress',
+ 'erc20ProxyContractAddress',
+ 'erc721ProxyContractAddress',
],
};
diff --git a/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts b/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts
index f7f6727f0..f2a9a4d56 100644
--- a/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts
+++ b/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts
@@ -22,8 +22,8 @@ export const zeroExPublicNetworkConfigSchema = {
gasPrice: { $ref: '/Number' },
zrxContractAddress: { $ref: '/Address' },
exchangeContractAddress: { $ref: '/Address' },
- tokenRegistryContractAddress: { $ref: '/Address' },
- tokenTransferProxyContractAddress: { $ref: '/Address' },
+ erc20ProxyContractAddress: { $ref: '/Address' },
+ erc721ProxyContractAddress: { $ref: '/Address' },
orderWatcherConfig: {
type: 'object',
properties: {
diff --git a/packages/0x.js/test/0x.js_test.ts b/packages/0x.js/test/0x.js_test.ts
index 425fc6380..b4baecb1e 100644
--- a/packages/0x.js/test/0x.js_test.ts
+++ b/packages/0x.js/test/0x.js_test.ts
@@ -2,14 +2,13 @@ import { ContractWrappers } from '@0xproject/contract-wrappers';
import { BlockchainLifecycle } from '@0xproject/dev-utils';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
-import * as _ from 'lodash';
import 'mocha';
-import { ApprovalContractEventArgs, LogWithDecodedArgs, TokenEvents, ZeroEx } from '../src';
+import { ERC20TokenApprovalEventArgs, ERC20TokenEvents, LogWithDecodedArgs, ZeroEx } from '../src';
import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants';
-import { TokenUtils } from './utils/token_utils';
+import { tokenUtils } from './utils/token_utils';
import { provider, web3Wrapper } from './utils/web3_wrapper';
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
@@ -28,9 +27,7 @@ describe('ZeroEx library', () => {
it('overrides provider in nested web3s and invalidates contractInstances', async () => {
// Instantiate the contract instances with the current provider
await (zeroEx.exchange as any)._getExchangeContractAsync();
- await (zeroEx.tokenRegistry as any)._getTokenRegistryContractAsync();
expect((zeroEx.exchange as any)._exchangeContractIfExists).to.not.be.undefined();
- expect((zeroEx.tokenRegistry as any)._tokenRegistryContractIfExists).to.not.be.undefined();
// Add property to newProvider so that we can differentiate it from old provider
(provider as any).zeroExTestId = 1;
@@ -38,52 +35,43 @@ describe('ZeroEx library', () => {
// Check that contractInstances with old provider are removed after provider update
expect((zeroEx.exchange as any)._exchangeContractIfExists).to.be.undefined();
- expect((zeroEx.tokenRegistry as any)._tokenRegistryContractIfExists).to.be.undefined();
// Check that all nested zeroExContract/web3Wrapper instances return the updated provider
const nestedWeb3WrapperProvider = ((zeroEx as any)._contractWrappers as ContractWrappers).getProvider();
expect((nestedWeb3WrapperProvider as any).zeroExTestId).to.be.a('number');
const exchangeWeb3WrapperProvider = (zeroEx.exchange as any)._web3Wrapper.getProvider();
expect(exchangeWeb3WrapperProvider.zeroExTestId).to.be.a('number');
- const tokenRegistryWeb3WrapperProvider = (zeroEx.tokenRegistry as any)._web3Wrapper.getProvider();
- expect(tokenRegistryWeb3WrapperProvider.zeroExTestId).to.be.a('number');
});
});
describe('#isValidSignature', () => {
- // The Exchange smart contract `isValidSignature` method only validates orderHashes and assumes
- // the length of the data is exactly 32 bytes. Thus for these tests, we use data of this size.
const dataHex = '0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b0';
- const signature = {
- v: 27,
- r: '0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33',
- s: '0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254',
- };
+ const ethSignSignature =
+ '0x1B61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace225403';
const address = '0x5409ed021d9299bf6814279a6a1411a7e866a631';
it("should return false if the data doesn't pertain to the signature & address", async () => {
- return expect(
- (zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync('0x0', signature, address),
- ).to.become(false);
+ return expect((zeroEx.exchange as any).isValidSignatureAsync('0x0', address, ethSignSignature)).to.become(
+ false,
+ );
});
it("should return false if the address doesn't pertain to the signature & data", async () => {
const validUnrelatedAddress = '0x8b0292b11a196601ed2ce54b665cafeca0347d42';
return expect(
- (zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync(
- dataHex,
- signature,
- validUnrelatedAddress,
- ),
+ (zeroEx.exchange as any).isValidSignatureAsync(dataHex, validUnrelatedAddress, ethSignSignature),
).to.become(false);
});
it("should return false if the signature doesn't pertain to the dataHex & address", async () => {
- const wrongSignature = _.assign({}, signature, { v: 28 });
- return expect(
- (zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync(dataHex, wrongSignature, address),
- ).to.become(false);
+ const signatureArray = ethSignSignature.split('');
+ // tslint:disable-next-line:custom-no-magic-numbers
+ signatureArray[5] = 'C'; // V = 28, instead of 27
+ const wrongSignature = signatureArray.join('');
+ return expect((zeroEx.exchange as any).isValidSignatureAsync(dataHex, address, wrongSignature)).to.become(
+ false,
+ );
});
it('should return true if the signature does pertain to the dataHex & address', async () => {
- return expect(
- (zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync(dataHex, signature, address),
- ).to.become(true);
+ return expect((zeroEx.exchange as any).isValidSignatureAsync(dataHex, address, ethSignSignature)).to.become(
+ true,
+ );
});
});
describe('#toUnitAmount', () => {
@@ -128,18 +116,16 @@ describe('ZeroEx library', () => {
it('returns transaction receipt with decoded logs', async () => {
const availableAddresses = await zeroEx.getAvailableAddressesAsync();
const coinbase = availableAddresses[0];
- const tokens = await zeroEx.tokenRegistry.getTokensAsync();
- const tokenUtils = new TokenUtils(tokens);
- const zrxTokenAddress = tokenUtils.getProtocolTokenOrThrow().address;
- const proxyAddress = zeroEx.proxy.getContractAddress();
- const txHash = await zeroEx.token.setUnlimitedProxyAllowanceAsync(zrxTokenAddress, coinbase);
+ const zrxTokenAddress = tokenUtils.getProtocolTokenAddress();
+ const erc20ProxyAddress = zeroEx.erc20Proxy.getContractAddress();
+ const txHash = await zeroEx.erc20Token.setUnlimitedProxyAllowanceAsync(zrxTokenAddress, coinbase);
const txReceiptWithDecodedLogs = await zeroEx.awaitTransactionMinedAsync(txHash);
// tslint:disable-next-line:no-unnecessary-type-assertion
- const log = txReceiptWithDecodedLogs.logs[0] as LogWithDecodedArgs<ApprovalContractEventArgs>;
- expect(log.event).to.be.equal(TokenEvents.Approval);
+ const log = txReceiptWithDecodedLogs.logs[0] as LogWithDecodedArgs<ERC20TokenApprovalEventArgs>;
+ expect(log.event).to.be.equal(ERC20TokenEvents.Approval);
expect(log.args._owner).to.be.equal(coinbase);
- expect(log.args._spender).to.be.equal(proxyAddress);
- expect(log.args._value).to.be.bignumber.equal(zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS);
+ expect(log.args._spender).to.be.equal(erc20ProxyAddress);
+ expect(log.args._value).to.be.bignumber.equal(zeroEx.erc20Token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS);
});
});
describe('#config', () => {
@@ -151,15 +137,13 @@ describe('ZeroEx library', () => {
const zeroExWithWrongExchangeAddress = new ZeroEx(provider, zeroExConfig);
expect(zeroExWithWrongExchangeAddress.exchange.getContractAddress()).to.be.equal(ZeroEx.NULL_ADDRESS);
});
- it('allows to specify token registry token contract address', async () => {
+ it('allows to specify erc20Proxy contract address', async () => {
const zeroExConfig = {
- tokenRegistryContractAddress: ZeroEx.NULL_ADDRESS,
+ erc20ProxyContractAddress: ZeroEx.NULL_ADDRESS,
networkId: constants.TESTRPC_NETWORK_ID,
};
- const zeroExWithWrongTokenRegistryAddress = new ZeroEx(provider, zeroExConfig);
- expect(zeroExWithWrongTokenRegistryAddress.tokenRegistry.getContractAddress()).to.be.equal(
- ZeroEx.NULL_ADDRESS,
- );
+ const zeroExWithWrongERC20ProxyAddress = new ZeroEx(provider, zeroExConfig);
+ expect(zeroExWithWrongERC20ProxyAddress.erc20Proxy.getContractAddress()).to.be.equal(ZeroEx.NULL_ADDRESS);
});
});
});
diff --git a/packages/0x.js/test/artifacts_test.ts b/packages/0x.js/test/artifacts_test.ts
deleted file mode 100644
index e65b85ad6..000000000
--- a/packages/0x.js/test/artifacts_test.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { web3Factory } from '@0xproject/dev-utils';
-
-import { ZeroEx } from '../src';
-
-import { chaiSetup } from './utils/chai_setup';
-import { constants } from './utils/constants';
-
-chaiSetup.configure();
-
-// Those tests are slower cause they're talking to a remote node
-const TIMEOUT = 10000;
-
-describe('Artifacts', () => {
- describe('contracts are deployed on kovan', () => {
- const kovanRpcUrl = constants.KOVAN_RPC_URL;
- const provider = web3Factory.getRpcProvider({ rpcUrl: kovanRpcUrl });
- const config = {
- networkId: constants.KOVAN_NETWORK_ID,
- };
- const zeroEx = new ZeroEx(provider, config);
- it('token registry contract is deployed', async () => {
- await (zeroEx.tokenRegistry as any)._getTokenRegistryContractAsync();
- }).timeout(TIMEOUT);
- it('proxy contract is deployed', async () => {
- await (zeroEx.proxy as any)._getTokenTransferProxyContractAsync();
- }).timeout(TIMEOUT);
- it('exchange contract is deployed', async () => {
- await (zeroEx.exchange as any)._getExchangeContractAsync();
- }).timeout(TIMEOUT);
- });
- describe('contracts are deployed on ropsten', () => {
- const ropstenRpcUrl = constants.ROPSTEN_RPC_URL;
- const provider = web3Factory.getRpcProvider({ rpcUrl: ropstenRpcUrl });
- const config = {
- networkId: constants.ROPSTEN_NETWORK_ID,
- };
- const zeroEx = new ZeroEx(provider, config);
- it('token registry contract is deployed', async () => {
- await (zeroEx.tokenRegistry as any)._getTokenRegistryContractAsync();
- }).timeout(TIMEOUT);
- it('proxy contract is deployed', async () => {
- await (zeroEx.proxy as any)._getTokenTransferProxyContractAsync();
- }).timeout(TIMEOUT);
- it('exchange contract is deployed', async () => {
- await (zeroEx.exchange as any)._getExchangeContractAsync();
- }).timeout(TIMEOUT);
- });
-});
diff --git a/packages/0x.js/test/global_hooks.ts b/packages/0x.js/test/global_hooks.ts
index 9d6903af5..364828231 100644
--- a/packages/0x.js/test/global_hooks.ts
+++ b/packages/0x.js/test/global_hooks.ts
@@ -1,5 +1,5 @@
import { devConstants } from '@0xproject/dev-utils';
-import { runV1MigrationsAsync } from '@0xproject/migrations';
+import { runV2MigrationsAsync } from '@0xproject/migrations';
import { provider } from './utils/web3_wrapper';
@@ -7,11 +7,11 @@ before('migrate contracts', async function(): Promise<void> {
// HACK: Since the migrations take longer then our global mocha timeout limit
// we manually increase it for this before hook.
const mochaTestTimeoutMs = 20000;
- this.timeout(mochaTestTimeoutMs);
+ this.timeout(mochaTestTimeoutMs); // tslint:disable-line:no-invalid-this
const txDefaults = {
gas: devConstants.GAS_LIMIT,
from: devConstants.TESTRPC_FIRST_ADDRESS,
};
- const artifactsDir = `../migrations/artifacts/1.0.0`;
- await runV1MigrationsAsync(provider, artifactsDir, txDefaults);
+ const artifactsDir = `../migrations/artifacts/2.0.0`;
+ await runV2MigrationsAsync(provider, artifactsDir, txDefaults);
});
diff --git a/packages/0x.js/test/utils/token_utils.ts b/packages/0x.js/test/utils/token_utils.ts
index fe4886ba4..a439c464d 100644
--- a/packages/0x.js/test/utils/token_utils.ts
+++ b/packages/0x.js/test/utils/token_utils.ts
@@ -1,34 +1,9 @@
-import { Token } from '@0xproject/types';
-import * as _ from 'lodash';
+import { artifacts } from '../../src/artifacts';
-import { InternalZeroExError } from '../../src/types';
+import { constants } from './constants';
-const PROTOCOL_TOKEN_SYMBOL = 'ZRX';
-const WETH_TOKEN_SYMBOL = 'WETH';
-
-export class TokenUtils {
- private _tokens: Token[];
- constructor(tokens: Token[]) {
- this._tokens = tokens;
- }
- public getProtocolTokenOrThrow(): Token {
- const zrxToken = _.find(this._tokens, { symbol: PROTOCOL_TOKEN_SYMBOL });
- if (_.isUndefined(zrxToken)) {
- throw new Error(InternalZeroExError.ZrxNotInTokenRegistry);
- }
- return zrxToken;
- }
- public getWethTokenOrThrow(): Token {
- const wethToken = _.find(this._tokens, { symbol: WETH_TOKEN_SYMBOL });
- if (_.isUndefined(wethToken)) {
- throw new Error(InternalZeroExError.WethNotInTokenRegistry);
- }
- return wethToken;
- }
- public getDummyTokens(): Token[] {
- const dummyTokens = _.filter(this._tokens, token => {
- return !_.includes([PROTOCOL_TOKEN_SYMBOL, WETH_TOKEN_SYMBOL], token.symbol);
- });
- return dummyTokens;
- }
-}
+export const tokenUtils = {
+ getProtocolTokenAddress(): string {
+ return artifacts.ZRXToken.networks[constants.TESTRPC_NETWORK_ID].address;
+ },
+};
diff --git a/packages/0x.js/test/utils/web3_wrapper.ts b/packages/0x.js/test/utils/web3_wrapper.ts
index f7d11f138..02c8c5918 100644
--- a/packages/0x.js/test/utils/web3_wrapper.ts
+++ b/packages/0x.js/test/utils/web3_wrapper.ts
@@ -1,8 +1,12 @@
-import { web3Factory } from '@0xproject/dev-utils';
-import { Provider } from '@0xproject/types';
+import { devConstants, web3Factory } from '@0xproject/dev-utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
+import { Provider } from 'ethereum-types';
+const txDefaults = {
+ from: devConstants.TESTRPC_FIRST_ADDRESS,
+ gas: devConstants.GAS_LIMIT,
+};
const provider: Provider = web3Factory.getRpcProvider({ shouldUseInProcessGanache: true });
const web3Wrapper = new Web3Wrapper(provider);
-export { provider, web3Wrapper };
+export { provider, web3Wrapper, txDefaults };
diff --git a/packages/abi-gen/CHANGELOG.json b/packages/abi-gen/CHANGELOG.json
index 38b72dbf3..048972041 100644
--- a/packages/abi-gen/CHANGELOG.json
+++ b/packages/abi-gen/CHANGELOG.json
@@ -9,6 +9,19 @@
{
"note": "Remove the output directory before writing to it",
"pr": 822
+ },
+ {
+ "note": "skip generation of wrappers that are already up to date",
+ "pr": 788
+ }
+ ]
+ },
+ {
+ "timestamp": 1531919263,
+ "version": "0.3.4",
+ "changes": [
+ {
+ "note": "Dependencies updated"
}
]
},
diff --git a/packages/abi-gen/CHANGELOG.md b/packages/abi-gen/CHANGELOG.md
index 33bc3276a..d7de561c8 100644
--- a/packages/abi-gen/CHANGELOG.md
+++ b/packages/abi-gen/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v0.3.4 - _July 18, 2018_
+
+ * Dependencies updated
+
## v0.3.3 - _July 9, 2018_
* Dependencies updated
diff --git a/packages/abi-gen/bin/abi-gen.js b/packages/abi-gen/bin/abi-gen.js
index c46eb9b66..8d6bdccf8 100755
--- a/packages/abi-gen/bin/abi-gen.js
+++ b/packages/abi-gen/bin/abi-gen.js
@@ -1,2 +1,2 @@
#!/usr/bin/env node
-require('../lib/index.js')
+require('../lib/src/index.js')
diff --git a/packages/abi-gen/coverage/.gitkeep b/packages/abi-gen/coverage/.gitkeep
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/packages/abi-gen/coverage/.gitkeep
diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json
index 7d7a20e68..5e52662d0 100644
--- a/packages/abi-gen/package.json
+++ b/packages/abi-gen/package.json
@@ -1,6 +1,6 @@
{
"name": "@0xproject/abi-gen",
- "version": "0.3.3",
+ "version": "0.3.4",
"engines": {
"node": ">=6.12"
},
@@ -12,6 +12,11 @@
"lint": "tslint --project .",
"clean": "shx rm -rf lib scripts",
"build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts",
+ "test": "yarn run_mocha",
+ "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --bail --exit",
+ "test:circleci": "yarn test:coverage",
+ "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
+ "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
},
"bin": {
@@ -27,15 +32,16 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
"dependencies": {
- "@0xproject/typescript-typings": "^0.4.2",
- "@0xproject/utils": "^0.7.2",
- "ethereum-types": "^0.0.2",
+ "@0xproject/typescript-typings": "^0.4.3",
+ "@0xproject/utils": "^0.7.3",
"chalk": "^2.3.0",
+ "ethereum-types": "^0.0.2",
"glob": "^7.1.2",
"handlebars": "^4.0.11",
"lodash": "^4.17.4",
- "rimraf": "^2.6.2",
"mkdirp": "^0.5.1",
+ "sleep": "^5.1.1",
+ "tmp": "^0.0.33",
"to-snake-case": "^1.0.0",
"yargs": "^10.0.3"
},
@@ -43,16 +49,20 @@
"@0xproject/monorepo-scripts": "^0.2.2",
"@0xproject/tslint-config": "^0.4.21",
"@types/glob": "5.0.35",
- "@types/rimraf": "^2.0.2",
"@types/handlebars": "^4.0.36",
"@types/mkdirp": "^0.5.1",
"@types/node": "^8.0.53",
+ "@types/sleep": "^0.0.7",
+ "@types/tmp": "^0.0.33",
"@types/yargs": "^10.0.0",
+ "chai": "^4.1.2",
"copyfiles": "^1.2.0",
+ "dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
+ "mocha": "^5.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
- "tslint": "5.8.0",
+ "tslint": "5.11.0",
"typescript": "2.7.1"
},
"publishConfig": {
diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts
index 47f2c404b..753bb2cce 100644
--- a/packages/abi-gen/src/index.ts
+++ b/packages/abi-gen/src/index.ts
@@ -3,16 +3,12 @@
import { abiUtils, logUtils } from '@0xproject/utils';
import chalk from 'chalk';
import { AbiDefinition, ConstructorAbi, EventAbi, MethodAbi } from 'ethereum-types';
-import * as fs from 'fs';
import { sync as globSync } from 'glob';
import * as Handlebars from 'handlebars';
import * as _ from 'lodash';
import * as mkdirp from 'mkdirp';
-import * as rimraf from 'rimraf';
import * as yargs from 'yargs';
-import toSnakeCase = require('to-snake-case');
-
import { ContextData, ContractsBackend, ParamKind } from './types';
import { utils } from './utils';
@@ -71,16 +67,6 @@ function registerPartials(partialsGlob: string): void {
}
}
-function writeOutputFile(name: string, renderedTsCode: string): void {
- let fileName = toSnakeCase(name);
- // HACK: Snake case doesn't make a lot of sense for abbreviated names but we can't reliably detect abbreviations
- // so we special-case the abbreviations we use.
- fileName = fileName.replace('z_r_x', 'zrx').replace('e_r_c', 'erc');
- const filePath = `${args.output}/${fileName}.ts`;
- fs.writeFileSync(filePath, renderedTsCode);
- logUtils.log(`Created: ${chalk.bold(filePath)}`);
-}
-
Handlebars.registerHelper('parameterType', utils.solTypeToTsType.bind(utils, ParamKind.Input, args.backend));
Handlebars.registerHelper('returnType', utils.solTypeToTsType.bind(utils, ParamKind.Output, args.backend));
if (args.partials) {
@@ -97,7 +83,6 @@ if (_.isEmpty(abiFileNames)) {
process.exit(1);
} else {
logUtils.log(`Found ${chalk.green(`${abiFileNames.length}`)} ${chalk.bold('ABI')} files`);
- rimraf.sync(args.output);
mkdirp.sync(args.output);
}
for (const abiFileName of abiFileNames) {
@@ -120,6 +105,14 @@ for (const abiFileName of abiFileNames) {
process.exit(1);
}
+ const outFileName = utils.makeOutputFileName(namedContent.name);
+ const outFilePath = `${args.output}/${outFileName}.ts`;
+
+ if (utils.isOutputFileUpToDate(abiFileName, outFilePath)) {
+ logUtils.log(`Aready up to date: ${chalk.bold(outFilePath)}`);
+ continue;
+ }
+
let ctor = ABI.find((abi: AbiDefinition) => abi.type === ABI_TYPE_CONSTRUCTOR) as ConstructorAbi;
if (_.isUndefined(ctor)) {
ctor = utils.getEmptyConstructor(); // The constructor exists, but it's implicit in JSON's ABI definition
@@ -154,5 +147,6 @@ for (const abiFileName of abiFileNames) {
events: eventAbis,
};
const renderedTsCode = template(contextData);
- writeOutputFile(namedContent.name, renderedTsCode);
+ utils.writeOutputFile(outFilePath, renderedTsCode);
+ logUtils.log(`Created: ${chalk.bold(outFilePath)}`);
}
diff --git a/packages/abi-gen/src/utils.ts b/packages/abi-gen/src/utils.ts
index 66390174c..56b996ce3 100644
--- a/packages/abi-gen/src/utils.ts
+++ b/packages/abi-gen/src/utils.ts
@@ -2,6 +2,7 @@ import { AbiType, ConstructorAbi, DataItem } from 'ethereum-types';
import * as fs from 'fs';
import * as _ from 'lodash';
import * as path from 'path';
+import toSnakeCase = require('to-snake-case');
import { ContractsBackend, ParamKind } from './types';
@@ -92,4 +93,27 @@ export const utils = {
inputs: [],
};
},
+ makeOutputFileName(name: string): string {
+ let fileName = toSnakeCase(name);
+ // HACK: Snake case doesn't make a lot of sense for abbreviated names but we can't reliably detect abbreviations
+ // so we special-case the abbreviations we use.
+ fileName = fileName.replace('z_r_x', 'zrx').replace('e_r_c', 'erc');
+ return fileName;
+ },
+ writeOutputFile(filePath: string, renderedTsCode: string): void {
+ fs.writeFileSync(filePath, renderedTsCode);
+ },
+ isOutputFileUpToDate(abiFile: string, outputFile: string): boolean {
+ const abiFileModTimeMs = fs.statSync(abiFile).mtimeMs;
+ try {
+ const outFileModTimeMs = fs.statSync(outputFile).mtimeMs;
+ return outFileModTimeMs > abiFileModTimeMs;
+ } catch (err) {
+ if (err.code === 'ENOENT') {
+ return false;
+ } else {
+ throw err;
+ }
+ }
+ },
};
diff --git a/packages/abi-gen/test/utils_test.ts b/packages/abi-gen/test/utils_test.ts
new file mode 100644
index 000000000..820c0c675
--- /dev/null
+++ b/packages/abi-gen/test/utils_test.ts
@@ -0,0 +1,86 @@
+import * as chai from 'chai';
+import * as dirtyChai from 'dirty-chai';
+import * as fs from 'fs';
+import 'mocha';
+import * as tmp from 'tmp';
+
+import { utils } from '../src/utils';
+
+tmp.setGracefulCleanup(); // remove tmp files even if there are failures
+
+chai.use(dirtyChai);
+
+const expect = chai.expect;
+
+describe('makeOutputFileName()', () => {
+ it('should handle Metacoin usage', () => {
+ expect(utils.makeOutputFileName('Metacoin')).to.equal('metacoin');
+ });
+ it('should handle special zrx_token case', () => {
+ expect(utils.makeOutputFileName('ZRXToken')).to.equal('zrx_token');
+ });
+ it('should handle special erc_token case', () => {
+ expect(utils.makeOutputFileName('ERC20Token')).to.equal('erc20_token');
+ });
+});
+
+describe('writeOutputFile()', () => {
+ let tempFilePath: string;
+ before(() => {
+ tempFilePath = tmp.fileSync(
+ { discardDescriptor: true }, // close file (so we can update it)
+ ).name;
+ });
+ it('should write content to output file', () => {
+ const content = 'hello world';
+
+ utils.writeOutputFile(tempFilePath, content);
+
+ expect(fs.readFileSync(tempFilePath).toString()).to.equal(content);
+ });
+});
+
+describe('isOutputFileUpToDate()', () => {
+ it('should throw ENOENT when there is no abi file', () => {
+ expect(utils.isOutputFileUpToDate.bind('nonexistant1', 'nonexistant2')).to.throw('ENOENT');
+ });
+
+ describe('when the abi input file exists', () => {
+ let abiFile: string;
+ before(() => {
+ abiFile = tmp.fileSync(
+ { discardDescriptor: true }, // close file (set timestamp)
+ ).name;
+ });
+
+ describe('without an existing output file', () => {
+ it('should return false', () => {
+ expect(utils.isOutputFileUpToDate(abiFile, 'nonexistant_file')).to.be.false();
+ });
+ });
+
+ describe('with an existing output file', () => {
+ let outputFile: string;
+ before(() => {
+ outputFile = tmp.fileSync(
+ { discardDescriptor: true }, // close file (set timestamp)
+ ).name;
+ const abiFileModTimeMs = fs.statSync(abiFile).mtimeMs;
+ const outfileModTimeMs = abiFileModTimeMs + 1;
+ fs.utimesSync(outputFile, outfileModTimeMs, outfileModTimeMs);
+ });
+
+ it('should return true when output file is newer than abi file', async () => {
+ expect(utils.isOutputFileUpToDate(abiFile, outputFile)).to.be.true();
+ });
+
+ it('should return false when output file exists but is older than abi file', () => {
+ const outFileModTimeMs = fs.statSync(outputFile).mtimeMs;
+ const abiFileModTimeMs = outFileModTimeMs + 1;
+ fs.utimesSync(abiFile, abiFileModTimeMs, abiFileModTimeMs);
+
+ expect(utils.isOutputFileUpToDate(abiFile, outputFile)).to.be.false();
+ });
+ });
+ });
+});
diff --git a/packages/assert/CHANGELOG.json b/packages/assert/CHANGELOG.json
index 1ddc6d280..e72b0e9a4 100644
--- a/packages/assert/CHANGELOG.json
+++ b/packages/assert/CHANGELOG.json
@@ -10,6 +10,15 @@
]
},
{
+ "timestamp": 1531919263,
+ "version": "0.2.14",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1531149657,
"version": "0.2.13",
"changes": [
diff --git a/packages/assert/CHANGELOG.md b/packages/assert/CHANGELOG.md
index f0d2f55b0..663b06c0f 100644
--- a/packages/assert/CHANGELOG.md
+++ b/packages/assert/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v0.2.14 - _July 18, 2018_
+
+ * Dependencies updated
+
## v0.2.13 - _July 9, 2018_
* Dependencies updated
diff --git a/packages/assert/package.json b/packages/assert/package.json
index 3b9ecbb49..e734fa40b 100644
--- a/packages/assert/package.json
+++ b/packages/assert/package.json
@@ -44,13 +44,13 @@
"npm-run-all": "^4.1.2",
"nyc": "^11.0.1",
"shx": "^0.2.2",
- "tslint": "5.8.0",
+ "tslint": "5.11.0",
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/json-schemas": "^1.0.0",
- "@0xproject/typescript-typings": "^0.4.2",
- "@0xproject/utils": "^0.7.2",
+ "@0xproject/typescript-typings": "^0.4.3",
+ "@0xproject/utils": "^0.7.3",
"lodash": "^4.17.4",
"valid-url": "^1.0.9"
},
diff --git a/packages/assert/src/index.ts b/packages/assert/src/index.ts
index 8e18416c5..ccf2c9ad8 100644
--- a/packages/assert/src/index.ts
+++ b/packages/assert/src/index.ts
@@ -8,33 +8,33 @@ const HEX_REGEX = /^0x[0-9A-F]*$/i;
export const assert = {
isBigNumber(variableName: string, value: BigNumber): void {
const isBigNumber = _.isObject(value) && (value as any).isBigNumber;
- this.assert(isBigNumber, this.typeAssertionMessage(variableName, 'BigNumber', value));
+ assert.assert(isBigNumber, assert.typeAssertionMessage(variableName, 'BigNumber', value));
},
isValidBaseUnitAmount(variableName: string, value: BigNumber): void {
assert.isBigNumber(variableName, value);
const isNegative = value.lessThan(0);
- this.assert(!isNegative, `${variableName} cannot be a negative number, found value: ${value.toNumber()}`);
+ assert.assert(!isNegative, `${variableName} cannot be a negative number, found value: ${value.toNumber()}`);
const hasDecimals = value.decimalPlaces() !== 0;
- this.assert(
+ assert.assert(
!hasDecimals,
`${variableName} should be in baseUnits (no decimals), found value: ${value.toNumber()}`,
);
},
isString(variableName: string, value: string): void {
- this.assert(_.isString(value), this.typeAssertionMessage(variableName, 'string', value));
+ assert.assert(_.isString(value), assert.typeAssertionMessage(variableName, 'string', value));
},
isFunction(variableName: string, value: any): void {
- this.assert(_.isFunction(value), this.typeAssertionMessage(variableName, 'function', value));
+ assert.assert(_.isFunction(value), assert.typeAssertionMessage(variableName, 'function', value));
},
isHexString(variableName: string, value: string): void {
- this.assert(
+ assert.assert(
_.isString(value) && HEX_REGEX.test(value),
- this.typeAssertionMessage(variableName, 'HexString', value),
+ assert.typeAssertionMessage(variableName, 'HexString', value),
);
},
isETHAddressHex(variableName: string, value: string): void {
- this.assert(_.isString(value), this.typeAssertionMessage(variableName, 'string', value));
- this.assert(addressUtils.isAddress(value), this.typeAssertionMessage(variableName, 'ETHAddressHex', value));
+ assert.assert(_.isString(value), assert.typeAssertionMessage(variableName, 'string', value));
+ assert.assert(addressUtils.isAddress(value), assert.typeAssertionMessage(variableName, 'ETHAddressHex', value));
},
doesBelongToStringEnum(
variableName: string,
@@ -51,17 +51,17 @@ export const assert = {
);
},
hasAtMostOneUniqueValue(value: any[], errMsg: string): void {
- this.assert(_.uniq(value).length <= 1, errMsg);
+ assert.assert(_.uniq(value).length <= 1, errMsg);
},
isNumber(variableName: string, value: number): void {
- this.assert(_.isFinite(value), this.typeAssertionMessage(variableName, 'number', value));
+ assert.assert(_.isFinite(value), assert.typeAssertionMessage(variableName, 'number', value));
},
isBoolean(variableName: string, value: boolean): void {
- this.assert(_.isBoolean(value), this.typeAssertionMessage(variableName, 'boolean', value));
+ assert.assert(_.isBoolean(value), assert.typeAssertionMessage(variableName, 'boolean', value));
},
isWeb3Provider(variableName: string, value: any): void {
const isWeb3Provider = _.isFunction(value.send) || _.isFunction(value.sendAsync);
- this.assert(isWeb3Provider, this.typeAssertionMessage(variableName, 'Provider', value));
+ assert.assert(isWeb3Provider, assert.typeAssertionMessage(variableName, 'Provider', value));
},
doesConformToSchema(variableName: string, value: any, schema: Schema, subSchemas?: Schema[]): void {
if (_.isUndefined(value)) {
@@ -76,15 +76,15 @@ export const assert = {
const msg = `Expected ${variableName} to conform to schema ${schema.id}
Encountered: ${JSON.stringify(value, null, '\t')}
Validation errors: ${validationResult.errors.join(', ')}`;
- this.assert(!hasValidationErrors, msg);
+ assert.assert(!hasValidationErrors, msg);
},
isWebUri(variableName: string, value: any): void {
const isValidUrl = !_.isUndefined(validUrl.isWebUri(value));
- this.assert(isValidUrl, this.typeAssertionMessage(variableName, 'web uri', value));
+ assert.assert(isValidUrl, assert.typeAssertionMessage(variableName, 'web uri', value));
},
isUri(variableName: string, value: any): void {
const isValidUri = !_.isUndefined(validUrl.isUri(value));
- this.assert(isValidUri, this.typeAssertionMessage(variableName, 'uri', value));
+ assert.assert(isValidUri, assert.typeAssertionMessage(variableName, 'uri', value));
},
assert(condition: boolean, message: string): void {
if (!condition) {
diff --git a/packages/assert/test/assert_test.ts b/packages/assert/test/assert_test.ts
index 15fd3e6a8..cbbfe39db 100644
--- a/packages/assert/test/assert_test.ts
+++ b/packages/assert/test/assert_test.ts
@@ -49,7 +49,7 @@ describe('Assertions', () => {
});
describe('#isFunction', () => {
it('should not throw for valid input', () => {
- const validInputs = [BigNumber, assert.isString];
+ const validInputs = [BigNumber, assert.isString.bind(assert)];
validInputs.forEach(input => expect(assert.isFunction.bind(assert, variableName, input)).to.not.throw());
});
it('should throw for invalid input', () => {
diff --git a/packages/base-contract/CHANGELOG.json b/packages/base-contract/CHANGELOG.json
index 400489afa..3376a44f7 100644
--- a/packages/base-contract/CHANGELOG.json
+++ b/packages/base-contract/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1531919263,
+ "version": "0.3.6",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1531149657,
"version": "0.3.5",
"changes": [
diff --git a/packages/base-contract/CHANGELOG.md b/packages/base-contract/CHANGELOG.md
index ad73a1863..3118bc0d7 100644
--- a/packages/base-contract/CHANGELOG.md
+++ b/packages/base-contract/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v0.3.6 - _July 18, 2018_
+
+ * Dependencies updated
+
## v0.3.5 - _July 9, 2018_
* Dependencies updated
diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json
index afde81561..32910cd80 100644
--- a/packages/base-contract/package.json
+++ b/packages/base-contract/package.json
@@ -1,6 +1,6 @@
{
"name": "@0xproject/base-contract",
- "version": "0.3.5",
+ "version": "0.3.6",
"engines": {
"node": ">=6.12"
},
@@ -39,14 +39,14 @@
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
- "tslint": "5.8.0",
+ "tslint": "5.11.0",
"typescript": "2.7.1"
},
"dependencies": {
"ethereum-types": "^0.0.2",
- "@0xproject/typescript-typings": "^0.4.2",
- "@0xproject/utils": "^0.7.2",
- "@0xproject/web3-wrapper": "^0.7.2",
+ "@0xproject/typescript-typings": "^0.4.3",
+ "@0xproject/utils": "^0.7.3",
+ "@0xproject/web3-wrapper": "^0.7.3",
"ethers": "3.0.22",
"lodash": "^4.17.4"
},
diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts
index 6b970ec27..a240fb8b6 100644
--- a/packages/base-contract/src/index.ts
+++ b/packages/base-contract/src/index.ts
@@ -72,15 +72,13 @@ export class BaseContract {
// 1. Optional param passed in to public method call
// 2. Global config passed in at library instantiation
// 3. Gas estimate calculation + safety margin
- const removeUndefinedProperties = _.pickBy;
- const txDataWithDefaults: TxData = {
+ const removeUndefinedProperties = _.pickBy.bind(_);
+ const txDataWithDefaults = {
...removeUndefinedProperties(txDefaults),
- ...removeUndefinedProperties(txData as any),
- // HACK: TS can't prove that T is spreadable.
- // Awaiting https://github.com/Microsoft/TypeScript/pull/13288 to be merged
- } as any;
+ ...removeUndefinedProperties(txData),
+ };
if (_.isUndefined(txDataWithDefaults.gas) && !_.isUndefined(estimateGasAsync)) {
- txDataWithDefaults.gas = await estimateGasAsync(txDataWithDefaults as any);
+ txDataWithDefaults.gas = await estimateGasAsync(txDataWithDefaults);
}
return txDataWithDefaults;
}
diff --git a/packages/connect/CHANGELOG.json b/packages/connect/CHANGELOG.json
index c426f974b..c4813f589 100644
--- a/packages/connect/CHANGELOG.json
+++ b/packages/connect/CHANGELOG.json
@@ -1,5 +1,23 @@
[
{
+ "version": "1.0.0",
+ "changes": [
+ {
+ "note":
+ "Remove WebSocketOrderbookChannel from the public interface and replace with orderbookChannelFactory"
+ }
+ ]
+ },
+ {
+ "timestamp": 1531919263,
+ "version": "0.6.17",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1531149657,
"version": "0.6.16",
"changes": [
diff --git a/packages/connect/CHANGELOG.md b/packages/connect/CHANGELOG.md
index 5ae4cfbe3..acef109e0 100644
--- a/packages/connect/CHANGELOG.md
+++ b/packages/connect/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v0.6.17 - _July 18, 2018_
+
+ * Dependencies updated
+
## v0.6.16 - _July 9, 2018_
* Dependencies updated
diff --git a/packages/connect/package.json b/packages/connect/package.json
index 469d47d33..71fd60f6a 100644
--- a/packages/connect/package.json
+++ b/packages/connect/package.json
@@ -1,6 +1,6 @@
{
"name": "@0xproject/connect",
- "version": "0.6.16",
+ "version": "0.6.17",
"engines": {
"node": ">=6.12"
},
@@ -51,14 +51,14 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md",
"dependencies": {
- "@0xproject/assert": "^0.2.13",
- "@0xproject/json-schemas": "0.8.2",
+ "@0xproject/assert": "^0.2.14",
+ "@0xproject/json-schemas": "0.8.3",
"@0xproject/types": "^0.8.2",
- "@0xproject/typescript-typings": "^0.4.2",
- "@0xproject/utils": "^0.7.2",
- "isomorphic-fetch": "^2.2.1",
+ "@0xproject/typescript-typings": "^0.4.3",
+ "@0xproject/utils": "^0.7.3",
"lodash": "^4.17.4",
"query-string": "^5.0.1",
+ "sinon": "^4.0.0",
"websocket": "^1.0.25"
},
"devDependencies": {
@@ -68,7 +68,8 @@
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"@types/query-string": "^5.0.1",
- "@types/websocket": "^0.0.34",
+ "@types/sinon": "^2.2.2",
+ "@types/websocket": "^0.0.39",
"async-child-process": "^1.1.1",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
@@ -80,7 +81,7 @@
"npm-run-all": "^4.1.2",
"nyc": "^11.0.1",
"shx": "^0.2.2",
- "tslint": "5.8.0",
+ "tslint": "5.11.0",
"typedoc": "~0.8.0",
"typescript": "2.7.1"
},
diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts
index f6503835a..03cc590e4 100644
--- a/packages/connect/src/http_client.ts
+++ b/packages/connect/src/http_client.ts
@@ -1,7 +1,7 @@
import { assert } from '@0xproject/assert';
import { schemas } from '@0xproject/json-schemas';
import { SignedOrder } from '@0xproject/types';
-import 'isomorphic-fetch';
+import { fetchAsync } from '@0xproject/utils';
import * as _ from 'lodash';
import * as queryString from 'query-string';
@@ -38,7 +38,7 @@ const OPTS_TO_QUERY_FIELD_MAP = {
* that implement the standard relayer API v0
*/
export class HttpClient implements Client {
- private _apiEndpointUrl: string;
+ private readonly _apiEndpointUrl: string;
/**
* Format parameters to be appended to http requests into query string form
*/
@@ -167,7 +167,7 @@ export class HttpClient implements Client {
const headers = new Headers({
'content-type': 'application/json',
});
- const response = await fetch(url, {
+ const response = await fetchAsync(url, {
method: requestType,
body: JSON.stringify(payload),
headers,
diff --git a/packages/connect/src/index.ts b/packages/connect/src/index.ts
index ef5d8683e..7f5eb8ed3 100644
--- a/packages/connect/src/index.ts
+++ b/packages/connect/src/index.ts
@@ -1,5 +1,5 @@
export { HttpClient } from './http_client';
-export { WebSocketOrderbookChannel } from './ws_orderbook_channel';
+export { orderbookChannelFactory } from './orderbook_channel_factory';
export {
Client,
FeesRequest,
@@ -14,7 +14,6 @@ export {
TokenPairsItem,
TokenPairsRequestOpts,
TokenTradeInfo,
- WebSocketOrderbookChannelConfig,
} from './types';
export { Order, SignedOrder } from '@0xproject/types';
diff --git a/packages/connect/src/orderbook_channel_factory.ts b/packages/connect/src/orderbook_channel_factory.ts
new file mode 100644
index 000000000..5134af323
--- /dev/null
+++ b/packages/connect/src/orderbook_channel_factory.ts
@@ -0,0 +1,32 @@
+import * as WebSocket from 'websocket';
+
+import { OrderbookChannel, OrderbookChannelHandler } from './types';
+import { assert } from './utils/assert';
+import { WebSocketOrderbookChannel } from './ws_orderbook_channel';
+
+export const orderbookChannelFactory = {
+ /**
+ * Instantiates a new WebSocketOrderbookChannel instance
+ * @param url The relayer API base WS url you would like to interact with
+ * @param handler An OrderbookChannelHandler instance that responds to various
+ * channel updates
+ * @return An OrderbookChannel Promise
+ */
+ async createWebSocketOrderbookChannelAsync(
+ url: string,
+ handler: OrderbookChannelHandler,
+ ): Promise<OrderbookChannel> {
+ assert.isUri('url', url);
+ assert.isOrderbookChannelHandler('handler', handler);
+ return new Promise<OrderbookChannel>((resolve, reject) => {
+ const client = new WebSocket.w3cwebsocket(url);
+ client.onopen = () => {
+ const orderbookChannel = new WebSocketOrderbookChannel(client, handler);
+ resolve(orderbookChannel);
+ };
+ client.onerror = err => {
+ reject(err);
+ };
+ });
+ },
+};
diff --git a/packages/connect/src/schemas/schemas.ts b/packages/connect/src/schemas/schemas.ts
index b9a8472fb..0b8b798a9 100644
--- a/packages/connect/src/schemas/schemas.ts
+++ b/packages/connect/src/schemas/schemas.ts
@@ -3,7 +3,6 @@ import { orderBookRequestSchema } from './orderbook_request_schema';
import { ordersRequestOptsSchema } from './orders_request_opts_schema';
import { pagedRequestOptsSchema } from './paged_request_opts_schema';
import { tokenPairsRequestOptsSchema } from './token_pairs_request_opts_schema';
-import { webSocketOrderbookChannelConfigSchema } from './websocket_orderbook_channel_config_schema';
export const schemas = {
feesRequestSchema,
@@ -11,5 +10,4 @@ export const schemas = {
ordersRequestOptsSchema,
pagedRequestOptsSchema,
tokenPairsRequestOptsSchema,
- webSocketOrderbookChannelConfigSchema,
};
diff --git a/packages/connect/src/schemas/websocket_orderbook_channel_config_schema.ts b/packages/connect/src/schemas/websocket_orderbook_channel_config_schema.ts
deleted file mode 100644
index 81c0cac9c..000000000
--- a/packages/connect/src/schemas/websocket_orderbook_channel_config_schema.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export const webSocketOrderbookChannelConfigSchema = {
- id: '/WebSocketOrderbookChannelConfig',
- type: 'object',
- properties: {
- heartbeatIntervalMs: {
- type: 'number',
- minimum: 10,
- },
- },
-};
diff --git a/packages/connect/src/types.ts b/packages/connect/src/types.ts
index f5e52f50d..fc7a4b24d 100644
--- a/packages/connect/src/types.ts
+++ b/packages/connect/src/types.ts
@@ -11,18 +11,11 @@ export interface Client {
}
export interface OrderbookChannel {
- subscribe: (subscriptionOpts: OrderbookChannelSubscriptionOpts, handler: OrderbookChannelHandler) => void;
+ subscribe: (subscriptionOpts: OrderbookChannelSubscriptionOpts) => void;
close: () => void;
}
/**
- * heartbeatInterval: Interval in milliseconds that the orderbook channel should ping the underlying websocket. Default: 15000
- */
-export interface WebSocketOrderbookChannelConfig {
- heartbeatIntervalMs?: number;
-}
-
-/**
* baseTokenAddress: The address of token designated as the baseToken in the currency pair calculation of price
* quoteTokenAddress: The address of token designated as the quoteToken in the currency pair calculation of price
* snapshot: If true, a snapshot of the orderbook will be sent before the updates to the orderbook
@@ -46,8 +39,8 @@ export interface OrderbookChannelHandler {
subscriptionOpts: OrderbookChannelSubscriptionOpts,
order: SignedOrder,
) => void;
- onError: (channel: OrderbookChannel, subscriptionOpts: OrderbookChannelSubscriptionOpts, err: Error) => void;
- onClose: (channel: OrderbookChannel, subscriptionOpts: OrderbookChannelSubscriptionOpts) => void;
+ onError: (channel: OrderbookChannel, err: Error, subscriptionOpts?: OrderbookChannelSubscriptionOpts) => void;
+ onClose: (channel: OrderbookChannel) => void;
}
export type OrderbookChannelMessage =
diff --git a/packages/connect/src/utils/assert.ts b/packages/connect/src/utils/assert.ts
new file mode 100644
index 000000000..a0fd12fbd
--- /dev/null
+++ b/packages/connect/src/utils/assert.ts
@@ -0,0 +1,26 @@
+import { assert as sharedAssert } from '@0xproject/assert';
+// HACK: We need those two unused imports because they're actually used by sharedAssert which gets injected here
+// tslint:disable-next-line:no-unused-variable
+import { Schema, schemas } from '@0xproject/json-schemas';
+// tslint:disable-next-line:no-unused-variable
+import { ECSignature } from '@0xproject/types';
+// tslint:disable-next-line:no-unused-variable
+import { BigNumber } from '@0xproject/utils';
+import * as _ from 'lodash';
+
+export const assert = {
+ ...sharedAssert,
+ isOrderbookChannelSubscriptionOpts(variableName: string, subscriptionOpts: any): void {
+ sharedAssert.doesConformToSchema(
+ variableName,
+ subscriptionOpts,
+ schemas.relayerApiOrderbookChannelSubscribePayload,
+ );
+ },
+ isOrderbookChannelHandler(variableName: string, handler: any): void {
+ sharedAssert.isFunction(`${variableName}.onSnapshot`, _.get(handler, 'onSnapshot'));
+ sharedAssert.isFunction(`${variableName}.onUpdate`, _.get(handler, 'onUpdate'));
+ sharedAssert.isFunction(`${variableName}.onError`, _.get(handler, 'onError'));
+ sharedAssert.isFunction(`${variableName}.onClose`, _.get(handler, 'onClose'));
+ },
+};
diff --git a/packages/connect/src/utils/orderbook_channel_message_parser.ts b/packages/connect/src/utils/orderbook_channel_message_parser.ts
index 9a9ca8901..593288078 100644
--- a/packages/connect/src/utils/orderbook_channel_message_parser.ts
+++ b/packages/connect/src/utils/orderbook_channel_message_parser.ts
@@ -8,10 +8,16 @@ import { relayerResponseJsonParsers } from './relayer_response_json_parsers';
export const orderbookChannelMessageParser = {
parse(utf8Data: string): OrderbookChannelMessage {
+ // parse the message
const messageObj = JSON.parse(utf8Data);
+ // ensure we have a type parameter to switch on
const type: string = _.get(messageObj, 'type');
assert.assert(!_.isUndefined(type), `Message is missing a type parameter: ${utf8Data}`);
assert.isString('type', type);
+ // ensure we have a request id for the resulting message
+ const requestId: number = _.get(messageObj, 'requestId');
+ assert.assert(!_.isUndefined(requestId), `Message is missing a requestId parameter: ${utf8Data}`);
+ assert.isNumber('requestId', requestId);
switch (type) {
case OrderbookChannelMessageTypes.Snapshot: {
assert.doesConformToSchema('message', messageObj, schemas.relayerApiOrderbookChannelSnapshotSchema);
@@ -28,7 +34,7 @@ export const orderbookChannelMessageParser = {
default: {
return {
type: OrderbookChannelMessageTypes.Unknown,
- requestId: 0,
+ requestId,
payload: undefined,
};
}
diff --git a/packages/connect/src/utils/type_converters.ts b/packages/connect/src/utils/type_converters.ts
index c1808ce8a..210d452b9 100644
--- a/packages/connect/src/utils/type_converters.ts
+++ b/packages/connect/src/utils/type_converters.ts
@@ -6,12 +6,12 @@ export const typeConverters = {
const bids = _.get(orderbook, 'bids', []);
const asks = _.get(orderbook, 'asks', []);
return {
- bids: bids.map((order: any) => this.convertOrderStringFieldsToBigNumber(order)),
- asks: asks.map((order: any) => this.convertOrderStringFieldsToBigNumber(order)),
+ bids: bids.map((order: any) => typeConverters.convertOrderStringFieldsToBigNumber(order)),
+ asks: asks.map((order: any) => typeConverters.convertOrderStringFieldsToBigNumber(order)),
};
},
convertOrderStringFieldsToBigNumber(order: any): any {
- return this.convertStringsFieldsToBigNumbers(order, [
+ return typeConverters.convertStringsFieldsToBigNumbers(order, [
'makerTokenAmount',
'takerTokenAmount',
'makerFee',
diff --git a/packages/connect/src/ws_orderbook_channel.ts b/packages/connect/src/ws_orderbook_channel.ts
index bdcc8a75d..fa9f5e37f 100644
--- a/packages/connect/src/ws_orderbook_channel.ts
+++ b/packages/connect/src/ws_orderbook_channel.ts
@@ -1,166 +1,105 @@
-import { assert } from '@0xproject/assert';
-import { schemas } from '@0xproject/json-schemas';
import * as _ from 'lodash';
import * as WebSocket from 'websocket';
-import { schemas as clientSchemas } from './schemas/schemas';
import {
OrderbookChannel,
OrderbookChannelHandler,
OrderbookChannelMessageTypes,
OrderbookChannelSubscriptionOpts,
- WebsocketClientEventType,
- WebsocketConnectionEventType,
- WebSocketOrderbookChannelConfig,
} from './types';
+import { assert } from './utils/assert';
import { orderbookChannelMessageParser } from './utils/orderbook_channel_message_parser';
-const DEFAULT_HEARTBEAT_INTERVAL_MS = 15000;
-const MINIMUM_HEARTBEAT_INTERVAL_MS = 10;
-
/**
* This class includes all the functionality related to interacting with a websocket endpoint
* that implements the standard relayer API v0
*/
export class WebSocketOrderbookChannel implements OrderbookChannel {
- private _apiEndpointUrl: string;
- private _client: WebSocket.client;
- private _connectionIfExists?: WebSocket.connection;
- private _heartbeatTimerIfExists?: NodeJS.Timer;
- private _subscriptionCounter = 0;
- private _heartbeatIntervalMs: number;
+ private readonly _client: WebSocket.w3cwebsocket;
+ private readonly _handler: OrderbookChannelHandler;
+ private readonly _subscriptionOptsList: OrderbookChannelSubscriptionOpts[] = [];
/**
* Instantiates a new WebSocketOrderbookChannel instance
- * @param url The relayer API base WS url you would like to interact with
- * @param config The configuration object. Look up the type for the description.
+ * @param client A WebSocket client
+ * @param handler An OrderbookChannelHandler instance that responds to various
+ * channel updates
* @return An instance of WebSocketOrderbookChannel
*/
- constructor(url: string, config?: WebSocketOrderbookChannelConfig) {
- assert.isUri('url', url);
- if (!_.isUndefined(config)) {
- assert.doesConformToSchema('config', config, clientSchemas.webSocketOrderbookChannelConfigSchema);
- }
- this._apiEndpointUrl = url;
- this._heartbeatIntervalMs =
- _.isUndefined(config) || _.isUndefined(config.heartbeatIntervalMs)
- ? DEFAULT_HEARTBEAT_INTERVAL_MS
- : config.heartbeatIntervalMs;
- this._client = new WebSocket.client();
+ constructor(client: WebSocket.w3cwebsocket, handler: OrderbookChannelHandler) {
+ assert.isOrderbookChannelHandler('handler', handler);
+ // set private members
+ this._client = client;
+ this._handler = handler;
+ // attach client callbacks
+ this._client.onerror = err => {
+ this._handler.onError(this, err);
+ };
+ this._client.onclose = () => {
+ this._handler.onClose(this);
+ };
+ this._client.onmessage = message => {
+ this._handleWebSocketMessage(message);
+ };
}
/**
* Subscribe to orderbook snapshots and updates from the websocket
* @param subscriptionOpts An OrderbookChannelSubscriptionOpts instance describing which
* token pair to subscribe to
- * @param handler An OrderbookChannelHandler instance that responds to various
- * channel updates
*/
- public subscribe(subscriptionOpts: OrderbookChannelSubscriptionOpts, handler: OrderbookChannelHandler): void {
- assert.doesConformToSchema(
- 'subscriptionOpts',
- subscriptionOpts,
- schemas.relayerApiOrderbookChannelSubscribePayload,
- );
- assert.isFunction('handler.onSnapshot', _.get(handler, 'onSnapshot'));
- assert.isFunction('handler.onUpdate', _.get(handler, 'onUpdate'));
- assert.isFunction('handler.onError', _.get(handler, 'onError'));
- assert.isFunction('handler.onClose', _.get(handler, 'onClose'));
- this._subscriptionCounter += 1;
+ public subscribe(subscriptionOpts: OrderbookChannelSubscriptionOpts): void {
+ assert.isOrderbookChannelSubscriptionOpts('subscriptionOpts', subscriptionOpts);
+ assert.assert(this._client.readyState === WebSocket.w3cwebsocket.OPEN, 'WebSocket connection is closed');
+ this._subscriptionOptsList.push(subscriptionOpts);
+ // TODO: update requestId management to use UUIDs for v2
const subscribeMessage = {
type: 'subscribe',
channel: 'orderbook',
- requestId: this._subscriptionCounter,
+ requestId: this._subscriptionOptsList.length - 1,
payload: subscriptionOpts,
};
- this._getConnection((error, connection) => {
- if (!_.isUndefined(error)) {
- handler.onError(this, subscriptionOpts, error);
- } else if (!_.isUndefined(connection) && connection.connected) {
- connection.on(WebsocketConnectionEventType.Error, wsError => {
- handler.onError(this, subscriptionOpts, wsError);
- });
- connection.on(WebsocketConnectionEventType.Close, (_code: number, _desc: string) => {
- handler.onClose(this, subscriptionOpts);
- });
- connection.on(WebsocketConnectionEventType.Message, message => {
- this._handleWebSocketMessage(subscribeMessage.requestId, subscriptionOpts, message, handler);
- });
- connection.sendUTF(JSON.stringify(subscribeMessage));
- }
- });
+ this._client.send(JSON.stringify(subscribeMessage));
}
/**
* Close the websocket and stop receiving updates
*/
public close(): void {
- if (!_.isUndefined(this._connectionIfExists)) {
- this._connectionIfExists.close();
- }
- if (!_.isUndefined(this._heartbeatTimerIfExists)) {
- clearInterval(this._heartbeatTimerIfExists);
- }
+ this._client.close();
}
- private _getConnection(callback: (error?: Error, connection?: WebSocket.connection) => void): void {
- if (!_.isUndefined(this._connectionIfExists) && this._connectionIfExists.connected) {
- callback(undefined, this._connectionIfExists);
- } else {
- this._client.on(WebsocketClientEventType.Connect, connection => {
- this._connectionIfExists = connection;
- if (this._heartbeatIntervalMs >= MINIMUM_HEARTBEAT_INTERVAL_MS) {
- this._heartbeatTimerIfExists = setInterval(() => {
- connection.ping('');
- }, this._heartbeatIntervalMs);
- } else {
- callback(
- new Error(
- `Heartbeat interval is ${
- this._heartbeatIntervalMs
- }ms which is less than the required minimum of ${MINIMUM_HEARTBEAT_INTERVAL_MS}ms`,
- ),
- undefined,
- );
- }
- callback(undefined, this._connectionIfExists);
- });
- this._client.on(WebsocketClientEventType.ConnectFailed, error => {
- callback(error, undefined);
- });
- this._client.connect(this._apiEndpointUrl);
+ private _handleWebSocketMessage(message: any): void {
+ if (_.isUndefined(message.data)) {
+ this._handler.onError(this, new Error(`Message does not contain data. Url: ${this._client.url}`));
+ return;
}
- }
- private _handleWebSocketMessage(
- requestId: number,
- subscriptionOpts: OrderbookChannelSubscriptionOpts,
- message: WebSocket.IMessage,
- handler: OrderbookChannelHandler,
- ): void {
- if (!_.isUndefined(message.utf8Data)) {
- try {
- const utf8Data = message.utf8Data;
- const parserResult = orderbookChannelMessageParser.parse(utf8Data);
- if (parserResult.requestId === requestId) {
- switch (parserResult.type) {
- case OrderbookChannelMessageTypes.Snapshot: {
- handler.onSnapshot(this, subscriptionOpts, parserResult.payload);
- break;
- }
- case OrderbookChannelMessageTypes.Update: {
- handler.onUpdate(this, subscriptionOpts, parserResult.payload);
- break;
- }
- default: {
- handler.onError(
- this,
- subscriptionOpts,
- new Error(`Message has missing a type parameter: ${utf8Data}`),
- );
- }
- }
+ try {
+ const data = message.data;
+ const parserResult = orderbookChannelMessageParser.parse(data);
+ const subscriptionOpts = this._subscriptionOptsList[parserResult.requestId];
+ if (_.isUndefined(subscriptionOpts)) {
+ this._handler.onError(
+ this,
+ new Error(`Message has unknown requestId. Url: ${this._client.url} Message: ${data}`),
+ );
+ return;
+ }
+ switch (parserResult.type) {
+ case OrderbookChannelMessageTypes.Snapshot: {
+ this._handler.onSnapshot(this, subscriptionOpts, parserResult.payload);
+ break;
+ }
+ case OrderbookChannelMessageTypes.Update: {
+ this._handler.onUpdate(this, subscriptionOpts, parserResult.payload);
+ break;
+ }
+ default: {
+ this._handler.onError(
+ this,
+ new Error(`Message has unknown type parameter. Url: ${this._client.url} Message: ${data}`),
+ subscriptionOpts,
+ );
}
- } catch (error) {
- handler.onError(this, subscriptionOpts, error);
}
- } else {
- handler.onError(this, subscriptionOpts, new Error(`Message does not contain utf8Data`));
+ } catch (error) {
+ this._handler.onError(this, error);
}
}
}
diff --git a/packages/connect/test/orderbook_channel_factory_test.ts b/packages/connect/test/orderbook_channel_factory_test.ts
new file mode 100644
index 000000000..2ce361bd2
--- /dev/null
+++ b/packages/connect/test/orderbook_channel_factory_test.ts
@@ -0,0 +1,45 @@
+import * as chai from 'chai';
+import * as dirtyChai from 'dirty-chai';
+import * as _ from 'lodash';
+import 'mocha';
+
+import { orderbookChannelFactory } from '../src/orderbook_channel_factory';
+
+chai.config.includeStack = true;
+chai.use(dirtyChai);
+const expect = chai.expect;
+const emptyOrderbookChannelHandler = {
+ onSnapshot: () => {
+ _.noop();
+ },
+ onUpdate: () => {
+ _.noop();
+ },
+ onError: () => {
+ _.noop();
+ },
+ onClose: () => {
+ _.noop();
+ },
+};
+
+describe('orderbookChannelFactory', () => {
+ const websocketUrl = 'ws://localhost:8080';
+ describe('#createWebSocketOrderbookChannelAsync', () => {
+ it('throws when input is not a url', () => {
+ const badUrlInput = 54;
+ expect(
+ orderbookChannelFactory.createWebSocketOrderbookChannelAsync(
+ badUrlInput as any,
+ emptyOrderbookChannelHandler,
+ ),
+ ).to.be.rejected();
+ });
+ it('throws when handler has the incorrect members', () => {
+ const badHandlerInput = {};
+ expect(
+ orderbookChannelFactory.createWebSocketOrderbookChannelAsync(websocketUrl, badHandlerInput as any),
+ ).to.be.rejected();
+ });
+ });
+});
diff --git a/packages/connect/test/ws_orderbook_channel_test.ts b/packages/connect/test/ws_orderbook_channel_test.ts
index ce404d934..5a63cbdcc 100644
--- a/packages/connect/test/ws_orderbook_channel_test.ts
+++ b/packages/connect/test/ws_orderbook_channel_test.ts
@@ -2,60 +2,58 @@ import * as chai from 'chai';
import * as dirtyChai from 'dirty-chai';
import * as _ from 'lodash';
import 'mocha';
+import * as Sinon from 'sinon';
+import * as WebSocket from 'websocket';
import { WebSocketOrderbookChannel } from '../src/ws_orderbook_channel';
chai.config.includeStack = true;
chai.use(dirtyChai);
const expect = chai.expect;
+const emptyOrderbookChannelHandler = {
+ onSnapshot: () => {
+ _.noop();
+ },
+ onUpdate: () => {
+ _.noop();
+ },
+ onError: () => {
+ _.noop();
+ },
+ onClose: () => {
+ _.noop();
+ },
+};
describe('WebSocketOrderbookChannel', () => {
const websocketUrl = 'ws://localhost:8080';
- const orderbookChannel = new WebSocketOrderbookChannel(websocketUrl);
+ const openClient = new WebSocket.w3cwebsocket(websocketUrl);
+ Sinon.stub(openClient, 'readyState').get(() => WebSocket.w3cwebsocket.OPEN);
+ Sinon.stub(openClient, 'send').callsFake(_.noop.bind(_));
+ const openOrderbookChannel = new WebSocketOrderbookChannel(openClient, emptyOrderbookChannelHandler);
const subscriptionOpts = {
baseTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
quoteTokenAddress: '0xef7fff64389b814a946f3e92105513705ca6b990',
snapshot: true,
limit: 100,
};
- const emptyOrderbookChannelHandler = {
- onSnapshot: () => {
- _.noop();
- },
- onUpdate: () => {
- _.noop();
- },
- onError: () => {
- _.noop();
- },
- onClose: () => {
- _.noop();
- },
- };
describe('#subscribe', () => {
it('throws when subscriptionOpts does not conform to schema', () => {
- const badSubscribeCall = orderbookChannel.subscribe.bind(
- orderbookChannel,
- {},
- emptyOrderbookChannelHandler,
- );
+ const badSubscribeCall = openOrderbookChannel.subscribe.bind(openOrderbookChannel, {});
expect(badSubscribeCall).throws(
'Expected subscriptionOpts to conform to schema /RelayerApiOrderbookChannelSubscribePayload\nEncountered: {}\nValidation errors: instance requires property "baseTokenAddress", instance requires property "quoteTokenAddress"',
);
});
- it('throws when handler has the incorrect members', () => {
- const badSubscribeCall = orderbookChannel.subscribe.bind(orderbookChannel, subscriptionOpts, {});
- expect(badSubscribeCall).throws(
- 'Expected handler.onSnapshot to be of type function, encountered: undefined',
- );
- });
it('does not throw when inputs are of correct types', () => {
- const goodSubscribeCall = orderbookChannel.subscribe.bind(
- orderbookChannel,
- subscriptionOpts,
- emptyOrderbookChannelHandler,
- );
+ const goodSubscribeCall = openOrderbookChannel.subscribe.bind(openOrderbookChannel, subscriptionOpts);
expect(goodSubscribeCall).to.not.throw();
});
+ it('throws when client is closed', () => {
+ const closedClient = new WebSocket.w3cwebsocket(websocketUrl);
+ Sinon.stub(closedClient, 'readyState').get(() => WebSocket.w3cwebsocket.CLOSED);
+ const closedOrderbookChannel = new WebSocketOrderbookChannel(closedClient, emptyOrderbookChannelHandler);
+ const badSubscribeCall = closedOrderbookChannel.subscribe.bind(closedOrderbookChannel, subscriptionOpts);
+ expect(badSubscribeCall).throws('WebSocket connection is closed');
+ });
});
});
diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json
index 24f722f15..c6b5d07f7 100644
--- a/packages/contract-wrappers/CHANGELOG.json
+++ b/packages/contract-wrappers/CHANGELOG.json
@@ -13,6 +13,15 @@
"timestamp": 1531149657
},
{
+ "timestamp": 1531919263,
+ "version": "0.1.1",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1529397769,
"version": "0.0.5",
"changes": [
diff --git a/packages/contract-wrappers/CHANGELOG.md b/packages/contract-wrappers/CHANGELOG.md
index a2cc44f0d..822d0b486 100644
--- a/packages/contract-wrappers/CHANGELOG.md
+++ b/packages/contract-wrappers/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v0.1.1 - _July 18, 2018_
+
+ * Dependencies updated
+
## v0.1.0 - _July 9, 2018_
* Update Blockstream dep. to V5.0 and no longer force unsubscribe on blockstream error (which are not recoverable)
diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json
index b8fd8bd50..c37030797 100644
--- a/packages/contract-wrappers/package.json
+++ b/packages/contract-wrappers/package.json
@@ -1,6 +1,6 @@
{
"name": "@0xproject/contract-wrappers",
- "version": "0.1.0",
+ "version": "0.1.1",
"description": "Smart TS wrappers for 0x smart contracts",
"keywords": [
"0xproject",
@@ -43,12 +43,12 @@
"node": ">=6.0.0"
},
"devDependencies": {
- "@0xproject/abi-gen": "^0.3.3",
- "@0xproject/dev-utils": "^0.4.5",
- "@0xproject/migrations": "^0.0.9",
+ "@0xproject/abi-gen": "^0.3.4",
+ "@0xproject/dev-utils": "^0.4.6",
+ "@0xproject/migrations": "^0.0.10",
"@0xproject/monorepo-scripts": "^0.2.2",
- "@0xproject/sol-compiler": "^0.5.3",
- "@0xproject/subproviders": "^0.10.5",
+ "@0xproject/sol-compiler": "^0.5.4",
+ "@0xproject/subproviders": "^0.10.6",
"@0xproject/tslint-config": "^0.4.21",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
@@ -69,17 +69,17 @@
"shx": "^0.2.2",
"sinon": "^4.0.0",
"source-map-support": "^0.5.0",
- "tslint": "5.8.0",
- "typescript": "2.7.1",
- "web3-provider-engine": "14.0.6"
+ "web3-provider-engine": "14.0.6",
+ "tslint": "5.11.0",
+ "typescript": "2.7.1"
},
"dependencies": {
"@0xproject/assert": "^0.3.0",
- "@0xproject/base-contract": "^0.3.5",
+ "@0xproject/base-contract": "^0.3.6",
"@0xproject/order-utils": "^1.0.0",
- "@0xproject/typescript-typings": "^0.4.2",
- "@0xproject/utils": "^0.7.2",
- "@0xproject/web3-wrapper": "^0.7.2",
+ "@0xproject/typescript-typings": "^0.4.3",
+ "@0xproject/utils": "^0.7.3",
+ "@0xproject/web3-wrapper": "^0.7.3",
"@0xproject/fill-scenarios": "^1.0.0",
"@0xproject/json-schemas": "^1.0.0",
"@0xproject/types": "^1.0.0",
diff --git a/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts
index b8ca4d29b..daf70253a 100644
--- a/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts
@@ -1,5 +1,5 @@
import { ContractArtifact } from '@0xproject/sol-compiler';
-import { AbiDecoder, intervalUtils } from '@0xproject/utils';
+import { AbiDecoder, intervalUtils, logUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { BlockParamLiteral, ContractAbi, FilterObject, LogEntry, LogWithDecodedArgs, RawLog } from 'ethereum-types';
import { Block, BlockAndLogStreamer, Log } from 'ethereumjs-blockstream';
@@ -41,6 +41,13 @@ export abstract class ContractWrapper {
};
private _onLogAddedSubscriptionToken: string | undefined;
private _onLogRemovedSubscriptionToken: string | undefined;
+ private static _onBlockAndLogStreamerError(isVerbose: boolean, err: Error): void {
+ // Since Blockstream errors are all recoverable, we simply log them if the verbose
+ // config is passed in.
+ if (isVerbose) {
+ logUtils.warn(err);
+ }
+ }
constructor(web3Wrapper: Web3Wrapper, networkId: number, blockPollingIntervalMs?: number) {
this._web3Wrapper = web3Wrapper;
this._networkId = networkId;
@@ -79,10 +86,11 @@ export abstract class ContractWrapper {
indexFilterValues: IndexedFilterValues,
abi: ContractAbi,
callback: EventCallback<ArgsType>,
+ isVerbose: boolean = false,
): string {
const filter = filterUtils.getFilter(address, eventName, indexFilterValues, abi);
if (_.isUndefined(this._blockAndLogStreamerIfExists)) {
- this._startBlockAndLogStream();
+ this._startBlockAndLogStream(isVerbose);
}
const filterToken = filterUtils.generateUUID();
this._filters[filterToken] = filter;
@@ -151,21 +159,21 @@ export abstract class ContractWrapper {
}
});
}
- private _startBlockAndLogStream(): void {
+ private _startBlockAndLogStream(isVerbose: boolean): void {
if (!_.isUndefined(this._blockAndLogStreamerIfExists)) {
throw new Error(ContractWrappersError.SubscriptionAlreadyPresent);
}
this._blockAndLogStreamerIfExists = new BlockAndLogStreamer(
this._web3Wrapper.getBlockAsync.bind(this._web3Wrapper),
this._web3Wrapper.getLogsAsync.bind(this._web3Wrapper),
- this._onBlockAndLogStreamerError.bind(this),
+ ContractWrapper._onBlockAndLogStreamerError.bind(this, isVerbose),
);
const catchAllLogFilter = {};
this._blockAndLogStreamerIfExists.addLogFilter(catchAllLogFilter);
this._blockAndLogStreamIntervalIfExists = intervalUtils.setAsyncExcludingInterval(
this._reconcileBlockAsync.bind(this),
this._blockPollingIntervalMs,
- this._onReconcileBlockError.bind(this),
+ ContractWrapper._onBlockAndLogStreamerError.bind(this, isVerbose),
);
let isRemoved = false;
this._onLogAddedSubscriptionToken = this._blockAndLogStreamerIfExists.subscribeToOnLogAdded(
@@ -176,20 +184,10 @@ export abstract class ContractWrapper {
this._onLogStateChanged.bind(this, isRemoved),
);
}
- private _onBlockAndLogStreamerError(err: Error): void {
- // Propogate all Blockstream subscriber errors to all
- // top-level subscriptions
- const filterCallbacks = _.values(this._filterCallbacks);
- _.each(filterCallbacks, filterCallback => {
- filterCallback(err);
- });
- }
- private _onReconcileBlockError(err: Error): void {
- const filterTokens = _.keys(this._filterCallbacks);
- _.each(filterTokens, filterToken => {
- this._unsubscribe(filterToken, err);
- });
- }
+ // HACK: This should be a package-scoped method (which doesn't exist in TS)
+ // We don't want this method available in the public interface for all classes
+ // who inherit from ContractWrapper, and it is only used by the internal implementation
+ // of those higher classes.
// tslint:disable-next-line:no-unused-variable
private _setNetworkId(networkId: number): void {
this._networkId = networkId;
diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts
index 29c63564e..17bda5085 100644
--- a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts
@@ -347,6 +347,7 @@ export class ERC20TokenWrapper extends ContractWrapper {
* @param indexFilterValues An object where the keys are indexed args returned by the event and
* the value is the value you are interested in. E.g `{maker: aUserAddressHex}`
* @param callback Callback that gets called when a log is added/removed
+ * @param isVerbose Enable verbose subscription warnings (e.g recoverable network issues encountered)
* @return Subscription token used later to unsubscribe
*/
public subscribe<ArgsType extends ERC20TokenEventArgs>(
@@ -354,6 +355,7 @@ export class ERC20TokenWrapper extends ContractWrapper {
eventName: ERC20TokenEvents,
indexFilterValues: IndexedFilterValues,
callback: EventCallback<ArgsType>,
+ isVerbose: boolean = false,
): string {
assert.isETHAddressHex('tokenAddress', tokenAddress);
assert.doesBelongToStringEnum('eventName', eventName, ERC20TokenEvents);
@@ -366,6 +368,7 @@ export class ERC20TokenWrapper extends ContractWrapper {
indexFilterValues,
artifacts.ERC20Token.compilerOutput.abi,
callback,
+ isVerbose,
);
return subscriptionToken;
}
diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts
index b7e5519c4..7c2b41c62 100644
--- a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts
@@ -342,15 +342,17 @@ export class ERC721TokenWrapper extends ContractWrapper {
const normalizedSenderAddress = senderAddress.toLowerCase();
const tokenContract = await this._getTokenContractAsync(normalizedTokenAddress);
const ownerAddress = await this.getOwnerOfAsync(tokenAddress, tokenId);
- const isApprovedForAll = await this.isApprovedForAllAsync(
- normalizedTokenAddress,
- ownerAddress,
- normalizedSenderAddress,
- );
- if (!isApprovedForAll) {
- const approvedAddress = await this.getApprovedIfExistsAsync(normalizedTokenAddress, tokenId);
- if (approvedAddress !== senderAddress) {
- throw new Error(ContractWrappersError.ERC721NoApproval);
+ if (normalizedSenderAddress !== ownerAddress) {
+ const isApprovedForAll = await this.isApprovedForAllAsync(
+ normalizedTokenAddress,
+ ownerAddress,
+ normalizedSenderAddress,
+ );
+ if (!isApprovedForAll) {
+ const approvedAddress = await this.getApprovedIfExistsAsync(normalizedTokenAddress, tokenId);
+ if (approvedAddress !== normalizedSenderAddress) {
+ throw new Error(ContractWrappersError.ERC721NoApproval);
+ }
}
}
const txHash = await tokenContract.transferFrom.sendTransactionAsync(
@@ -372,6 +374,7 @@ export class ERC721TokenWrapper extends ContractWrapper {
* @param indexFilterValues An object where the keys are indexed args returned by the event and
* the value is the value you are interested in. E.g `{maker: aUserAddressHex}`
* @param callback Callback that gets called when a log is added/removed
+ * @param isVerbose Enable verbose subscription warnings (e.g recoverable network issues encountered)
* @return Subscription token used later to unsubscribe
*/
public subscribe<ArgsType extends ERC721TokenEventArgs>(
@@ -379,6 +382,7 @@ export class ERC721TokenWrapper extends ContractWrapper {
eventName: ERC721TokenEvents,
indexFilterValues: IndexedFilterValues,
callback: EventCallback<ArgsType>,
+ isVerbose: boolean = false,
): string {
assert.isETHAddressHex('tokenAddress', tokenAddress);
assert.doesBelongToStringEnum('eventName', eventName, ERC721TokenEvents);
@@ -391,6 +395,7 @@ export class ERC721TokenWrapper extends ContractWrapper {
indexFilterValues,
artifacts.ERC721Token.compilerOutput.abi,
callback,
+ isVerbose,
);
return subscriptionToken;
}
diff --git a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts
index 01440a5e1..5046d3667 100644
--- a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts
@@ -146,6 +146,7 @@ export class EtherTokenWrapper extends ContractWrapper {
* @param indexFilterValues An object where the keys are indexed args returned by the event and
* the value is the value you are interested in. E.g `{_owner: aUserAddressHex}`
* @param callback Callback that gets called when a log is added/removed
+ * @param isVerbose Enable verbose subscription warnings (e.g recoverable network issues encountered)
* @return Subscription token used later to unsubscribe
*/
public subscribe<ArgsType extends WETH9EventArgs>(
@@ -153,6 +154,7 @@ export class EtherTokenWrapper extends ContractWrapper {
eventName: WETH9Events,
indexFilterValues: IndexedFilterValues,
callback: EventCallback<ArgsType>,
+ isVerbose: boolean = false,
): string {
assert.isETHAddressHex('etherTokenAddress', etherTokenAddress);
const normalizedEtherTokenAddress = etherTokenAddress.toLowerCase();
@@ -165,6 +167,7 @@ export class EtherTokenWrapper extends ContractWrapper {
indexFilterValues,
artifacts.EtherToken.compilerOutput.abi,
callback,
+ isVerbose,
);
return subscriptionToken;
}
diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
index 8b7148aed..3e7619228 100644
--- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
@@ -1,4 +1,5 @@
import { schemas } from '@0xproject/json-schemas';
+import { assetDataUtils } from '@0xproject/order-utils';
import { AssetProxyId, Order, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
@@ -988,12 +989,14 @@ export class ExchangeWrapper extends ContractWrapper {
* @param indexFilterValues An object where the keys are indexed args returned by the event and
* the value is the value you are interested in. E.g `{maker: aUserAddressHex}`
* @param callback Callback that gets called when a log is added/removed
+ * @param isVerbose Enable verbose subscription warnings (e.g recoverable network issues encountered)
* @return Subscription token used later to unsubscribe
*/
public subscribe<ArgsType extends ExchangeEventArgs>(
eventName: ExchangeEvents,
indexFilterValues: IndexedFilterValues,
callback: EventCallback<ArgsType>,
+ isVerbose: boolean = false,
): string {
assert.doesBelongToStringEnum('eventName', eventName, ExchangeEvents);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
@@ -1005,6 +1008,7 @@ export class ExchangeWrapper extends ContractWrapper {
indexFilterValues,
artifacts.Exchange.compilerOutput.abi,
callback,
+ isVerbose,
);
return subscriptionToken;
}
@@ -1068,9 +1072,9 @@ export class ExchangeWrapper extends ContractWrapper {
* Returns the ZRX asset data used by the exchange contract.
* @return ZRX asset data
*/
- public async getZRXAssetDataAsync(): Promise<string> {
- const exchangeInstance = await this._getExchangeContractAsync();
- const zrxAssetData = exchangeInstance.ZRX_ASSET_DATA.callAsync();
+ public getZRXAssetData(): string {
+ const zrxTokenAddress = this.getZRXTokenAddress();
+ const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxTokenAddress);
return zrxAssetData;
}
// tslint:disable:no-unused-variable
diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts
index b3c4b2c60..e5485d7a6 100644
--- a/packages/contract-wrappers/src/index.ts
+++ b/packages/contract-wrappers/src/index.ts
@@ -1,7 +1,10 @@
export { ContractWrappers } from './contract_wrappers';
export { ERC20TokenWrapper } from './contract_wrappers/erc20_token_wrapper';
+export { ERC721TokenWrapper } from './contract_wrappers/erc721_token_wrapper';
export { EtherTokenWrapper } from './contract_wrappers/ether_token_wrapper';
+export { ExchangeWrapper } from './contract_wrappers/exchange_wrapper';
export { ERC20ProxyWrapper } from './contract_wrappers/erc20_proxy_wrapper';
+export { ERC721ProxyWrapper } from './contract_wrappers/erc721_proxy_wrapper';
export {
ContractWrappersError,
@@ -23,7 +26,15 @@ export {
OrderInfo,
} from './types';
-export { Order, SignedOrder, ECSignature, OrderStateValid, OrderStateInvalid, OrderState } from '@0xproject/types';
+export {
+ Order,
+ SignedOrder,
+ ECSignature,
+ OrderStateValid,
+ OrderStateInvalid,
+ OrderState,
+ AssetProxyId,
+} from '@0xproject/types';
export {
BlockParamLiteral,
@@ -57,6 +68,7 @@ export {
ERC721TokenApprovalForAllEventArgs,
ERC721TokenTransferEventArgs,
ERC721TokenEvents,
+ ERC721TokenEventArgs,
} from './contract_wrappers/generated/erc721_token';
export {
diff --git a/packages/contract-wrappers/src/schemas/contract_wrappers_private_network_config_schema.ts b/packages/contract-wrappers/src/schemas/contract_wrappers_private_network_config_schema.ts
index 4b68daf1a..7e2eca61c 100644
--- a/packages/contract-wrappers/src/schemas/contract_wrappers_private_network_config_schema.ts
+++ b/packages/contract-wrappers/src/schemas/contract_wrappers_private_network_config_schema.ts
@@ -8,8 +8,8 @@ export const contractWrappersPrivateNetworkConfigSchema = {
gasPrice: { $ref: '/Number' },
zrxContractAddress: { $ref: '/Address' },
exchangeContractAddress: { $ref: '/Address' },
- tokenRegistryContractAddress: { $ref: '/Address' },
- tokenTransferProxyContractAddress: { $ref: '/Address' },
+ erc20ProxyContractAddress: { $ref: '/Address' },
+ erc721ProxyContractAddress: { $ref: '/Address' },
blockPollingIntervalMs: { type: 'number' },
orderWatcherConfig: {
type: 'object',
@@ -30,7 +30,7 @@ export const contractWrappersPrivateNetworkConfigSchema = {
'networkId',
'zrxContractAddress',
'exchangeContractAddress',
- 'tokenRegistryContractAddress',
- 'tokenTransferProxyContractAddress',
+ 'erc20ProxyContractAddress',
+ 'erc721ProxyContractAddress',
],
};
diff --git a/packages/contract-wrappers/src/schemas/contract_wrappers_public_network_config_schema.ts b/packages/contract-wrappers/src/schemas/contract_wrappers_public_network_config_schema.ts
index 988872376..b80e04310 100644
--- a/packages/contract-wrappers/src/schemas/contract_wrappers_public_network_config_schema.ts
+++ b/packages/contract-wrappers/src/schemas/contract_wrappers_public_network_config_schema.ts
@@ -22,8 +22,8 @@ export const contractWrappersPublicNetworkConfigSchema = {
gasPrice: { $ref: '/Number' },
zrxContractAddress: { $ref: '/Address' },
exchangeContractAddress: { $ref: '/Address' },
- tokenRegistryContractAddress: { $ref: '/Address' },
- tokenTransferProxyContractAddress: { $ref: '/Address' },
+ erc20ProxyContractAddress: { $ref: '/Address' },
+ erc721ProxyContractAddress: { $ref: '/Address' },
blockPollingIntervalMs: { type: 'number' },
orderWatcherConfig: {
type: 'object',
diff --git a/packages/contract-wrappers/src/utils/assert.ts b/packages/contract-wrappers/src/utils/assert.ts
index da6697b08..842b16fa0 100644
--- a/packages/contract-wrappers/src/utils/assert.ts
+++ b/packages/contract-wrappers/src/utils/assert.ts
@@ -1,5 +1,5 @@
import { assert as sharedAssert } from '@0xproject/assert';
-// We need those two unused imports because they're actually used by sharedAssert which gets injected here
+// HACK: We need those two unused imports because they're actually used by sharedAssert which gets injected here
import { Schema } from '@0xproject/json-schemas'; // tslint:disable-line:no-unused-variable
import { isValidSignatureAsync } from '@0xproject/order-utils';
import { ECSignature } from '@0xproject/types'; // tslint:disable-line:no-unused-variable
diff --git a/packages/contract-wrappers/test/erc20_wrapper_test.ts b/packages/contract-wrappers/test/erc20_wrapper_test.ts
index 0011508e0..cf7ac527e 100644
--- a/packages/contract-wrappers/test/erc20_wrapper_test.ts
+++ b/packages/contract-wrappers/test/erc20_wrapper_test.ts
@@ -1,11 +1,10 @@
import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils';
-import { EmptyWalletSubprovider } from '@0xproject/subproviders';
+import { EmptyWalletSubprovider, Web3ProviderEngine } from '@0xproject/subproviders';
import { DoneCallback } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
import { Provider } from 'ethereum-types';
import 'mocha';
-import Web3ProviderEngine = require('web3-provider-engine');
import {
BlockParamLiteral,
diff --git a/packages/contract-wrappers/test/erc721_wrapper_test.ts b/packages/contract-wrappers/test/erc721_wrapper_test.ts
index 96b8fcf1d..f005ac2e0 100644
--- a/packages/contract-wrappers/test/erc721_wrapper_test.ts
+++ b/packages/contract-wrappers/test/erc721_wrapper_test.ts
@@ -1,11 +1,10 @@
import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils';
-import { EmptyWalletSubprovider } from '@0xproject/subproviders';
+import { EmptyWalletSubprovider, Web3ProviderEngine } from '@0xproject/subproviders';
import { DoneCallback } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
import { Provider } from 'ethereum-types';
import 'mocha';
-import Web3ProviderEngine = require('web3-provider-engine');
import {
BlockParamLiteral,
diff --git a/packages/contract-wrappers/test/ether_token_wrapper_test.ts b/packages/contract-wrappers/test/ether_token_wrapper_test.ts
index 0a860884a..48bd6d3f6 100644
--- a/packages/contract-wrappers/test/ether_token_wrapper_test.ts
+++ b/packages/contract-wrappers/test/ether_token_wrapper_test.ts
@@ -336,15 +336,19 @@ describe('EtherTokenWrapper', () => {
describe('#getLogsAsync', () => {
let etherTokenAddress: string;
let erc20ProxyAddress: string;
- const blockRange: BlockRange = {
- fromBlock: 0,
- toBlock: BlockParamLiteral.Latest,
- };
+ let blockRange: BlockRange;
let txHash: string;
- before(() => {
+ before(async () => {
addressWithETH = userAddresses[0];
etherTokenAddress = tokenUtils.getWethTokenAddress();
erc20ProxyAddress = contractWrappers.erc20Proxy.getContractAddress();
+ // Start the block range after all migrations to avoid unexpected logs
+ const currentBlock = await web3Wrapper.getBlockNumberAsync();
+ const fromBlock = currentBlock + 1;
+ blockRange = {
+ fromBlock,
+ toBlock: BlockParamLiteral.Latest,
+ };
});
it('should get logs with decoded args emitted by Approval', async () => {
txHash = await contractWrappers.erc20Token.setUnlimitedProxyAllowanceAsync(
diff --git a/packages/contract-wrappers/test/exchange_wrapper_test.ts b/packages/contract-wrappers/test/exchange_wrapper_test.ts
index b2c716008..dca212f65 100644
--- a/packages/contract-wrappers/test/exchange_wrapper_test.ts
+++ b/packages/contract-wrappers/test/exchange_wrapper_test.ts
@@ -1,6 +1,6 @@
import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils';
import { FillScenarios } from '@0xproject/fill-scenarios';
-import { assetProxyUtils, orderHashUtils } from '@0xproject/order-utils';
+import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils';
import { DoneCallback, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
@@ -53,7 +53,6 @@ describe('ExchangeWrapper', () => {
await blockchainLifecycle.startAsync();
contractWrappers = new ContractWrappers(provider, config);
exchangeContractAddress = contractWrappers.exchange.getContractAddress();
- const erc20ProxyAddress = contractWrappers.erc20Proxy.getContractAddress();
userAddresses = await web3Wrapper.getAvailableAddressesAsync();
zrxTokenAddress = tokenUtils.getProtocolTokenAddress();
fillScenarios = new FillScenarios(
@@ -61,13 +60,14 @@ describe('ExchangeWrapper', () => {
userAddresses,
zrxTokenAddress,
exchangeContractAddress,
- erc20ProxyAddress,
+ contractWrappers.erc20Proxy.getContractAddress(),
+ contractWrappers.erc721Proxy.getContractAddress(),
);
[coinbase, makerAddress, takerAddress, feeRecipient, anotherMakerAddress] = userAddresses;
[makerTokenAddress, takerTokenAddress] = tokenUtils.getDummyERC20TokenAddresses();
[makerAssetData, takerAssetData] = [
- assetProxyUtils.encodeERC20AssetData(makerTokenAddress),
- assetProxyUtils.encodeERC20AssetData(takerTokenAddress),
+ assetDataUtils.encodeERC20AssetData(makerTokenAddress),
+ assetDataUtils.encodeERC20AssetData(takerTokenAddress),
];
signedOrder = await fillScenarios.createFillableSignedOrderAsync(
makerAssetData,
@@ -264,8 +264,8 @@ describe('ExchangeWrapper', () => {
});
});
describe('#getZRXAssetData', () => {
- it('should get the asset data', async () => {
- const ZRX_ASSET_DATA = await contractWrappers.exchange.getZRXAssetDataAsync();
+ it('should get the asset data', () => {
+ const ZRX_ASSET_DATA = contractWrappers.exchange.getZRXAssetData();
const ASSET_DATA_HEX_LENGTH = 74;
expect(ZRX_ASSET_DATA).to.have.length(ASSET_DATA_HEX_LENGTH);
});
diff --git a/packages/contract-wrappers/test/global_hooks.ts b/packages/contract-wrappers/test/global_hooks.ts
index bf80e0908..05b23d5b8 100644
--- a/packages/contract-wrappers/test/global_hooks.ts
+++ b/packages/contract-wrappers/test/global_hooks.ts
@@ -7,7 +7,7 @@ before('migrate contracts', async function(): Promise<void> {
// HACK: Since the migrations take longer then our global mocha timeout limit
// we manually increase it for this before hook.
const mochaTestTimeoutMs = 50000;
- this.timeout(mochaTestTimeoutMs);
+ this.timeout(mochaTestTimeoutMs); // tslint:disable-line:no-invalid-this
const txDefaults = {
gas: devConstants.GAS_LIMIT,
from: devConstants.TESTRPC_FIRST_ADDRESS,
diff --git a/packages/contract-wrappers/test/subscription_test.ts b/packages/contract-wrappers/test/subscription_test.ts
index adda4ab78..80d17576f 100644
--- a/packages/contract-wrappers/test/subscription_test.ts
+++ b/packages/contract-wrappers/test/subscription_test.ts
@@ -49,44 +49,6 @@ describe('SubscriptionTest', () => {
_.each(stubs, s => s.restore());
stubs = [];
});
- it('Should receive the Error when an error occurs while fetching the block', (done: DoneCallback) => {
- (async () => {
- const errMsg = 'Error fetching block';
- const callback = callbackErrorReporter.assertNodeCallbackError(done, errMsg);
- stubs = [Sinon.stub((contractWrappers as any)._web3Wrapper, 'getBlockAsync').throws(new Error(errMsg))];
- contractWrappers.erc20Token.subscribe(
- tokenAddress,
- ERC20TokenEvents.Approval,
- indexFilterValues,
- callback,
- );
- await contractWrappers.erc20Token.setAllowanceAsync(
- tokenAddress,
- coinbase,
- addressWithoutFunds,
- allowanceAmount,
- );
- })().catch(done);
- });
- it('Should receive the Error when an error occurs while reconciling the new block', (done: DoneCallback) => {
- (async () => {
- const errMsg = 'Error fetching logs';
- const callback = callbackErrorReporter.assertNodeCallbackError(done, errMsg);
- stubs = [Sinon.stub((contractWrappers as any)._web3Wrapper, 'getLogsAsync').throws(new Error(errMsg))];
- contractWrappers.erc20Token.subscribe(
- tokenAddress,
- ERC20TokenEvents.Approval,
- indexFilterValues,
- callback,
- );
- await contractWrappers.erc20Token.setAllowanceAsync(
- tokenAddress,
- coinbase,
- addressWithoutFunds,
- allowanceAmount,
- );
- })().catch(done);
- });
it('Should allow unsubscribeAll to be called successfully after an error', (done: DoneCallback) => {
(async () => {
const callback = (err: Error | null, _logEvent?: DecodedLogEvent<ERC20TokenApprovalEventArgs>) =>
diff --git a/packages/contracts/compiler.json b/packages/contracts/compiler.json
index 5ace566d8..2a7f8bbb9 100644
--- a/packages/contracts/compiler.json
+++ b/packages/contracts/compiler.json
@@ -25,6 +25,7 @@
"DummyERC721Token",
"ERC20Proxy",
"ERC20Token",
+ "ERC721Token",
"ERC721Proxy",
"Exchange",
"ExchangeWrapper",
diff --git a/packages/contracts/package.json b/packages/contracts/package.json
index 98b133e63..e3f06f16a 100644
--- a/packages/contracts/package.json
+++ b/packages/contracts/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "contracts",
- "version": "2.1.34",
+ "version": "2.1.35",
"engines": {
"node": ">=6.12"
},
@@ -46,11 +46,11 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md",
"devDependencies": {
- "@0xproject/abi-gen": "^0.3.3",
- "@0xproject/dev-utils": "^0.4.5",
+ "@0xproject/abi-gen": "^0.3.4",
+ "@0xproject/dev-utils": "^0.4.6",
"@0xproject/tslint-config": "^0.4.21",
- "@0xproject/subproviders": "^0.10.5",
- "@0xproject/sol-cov": "^0.1.2",
+ "@0xproject/subproviders": "^0.10.6",
+ "@0xproject/sol-cov": "^0.1.3",
"@types/lodash": "4.14.104",
"@types/bn.js": "^4.11.0",
"@types/node": "^8.0.53",
@@ -67,18 +67,18 @@
"shx": "^0.2.2",
"solc": "^0.4.24",
"solhint": "^1.2.1",
- "tslint": "5.8.0",
+ "tslint": "5.11.0",
"typescript": "2.7.1",
"yargs": "^10.0.3"
},
"dependencies": {
- "@0xproject/base-contract": "^0.3.5",
+ "@0xproject/base-contract": "^0.3.6",
"@0xproject/order-utils": "^1.0.0",
- "@0xproject/sol-compiler": "^0.5.3",
+ "@0xproject/sol-compiler": "^0.5.4",
"@0xproject/types": "^1.0.0",
- "@0xproject/typescript-typings": "^0.4.2",
- "@0xproject/utils": "^0.7.2",
- "@0xproject/web3-wrapper": "^0.7.2",
+ "@0xproject/typescript-typings": "^0.4.3",
+ "@0xproject/utils": "^0.7.3",
+ "@0xproject/web3-wrapper": "^0.7.3",
"ethereum-types": "^0.0.2",
"bn.js": "^4.11.8",
"ethereumjs-abi": "^0.6.4",
diff --git a/packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol b/packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol
index 241e02d4a..aee722c53 100644
--- a/packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol
+++ b/packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol
@@ -18,7 +18,7 @@
pragma solidity ^0.4.10;
-import "../../current/multisig/MultiSigWalletWithTimeLock.sol";
+import "../../2.0.0/multisig/MultiSigWalletWithTimeLock.sol";
contract MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress is MultiSigWalletWithTimeLock {
@@ -79,4 +79,4 @@ contract MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress is MultiSigWall
}
return true;
}
-} \ No newline at end of file
+}
diff --git a/packages/contracts/src/2.0.0/forwarder/Forwarder.sol b/packages/contracts/src/2.0.0/forwarder/Forwarder.sol
index fc17a4c72..546e7f22c 100644
--- a/packages/contracts/src/2.0.0/forwarder/Forwarder.sol
+++ b/