From 7ae38906926dc09bc10670c361af0d2bf0050426 Mon Sep 17 00:00:00 2001 From: Hsuan Lee Date: Sat, 19 Jan 2019 18:42:04 +0800 Subject: Update dependency packages --- packages/0x.js/.npmignore | 10 - packages/0x.js/CHANGELOG.json | 1425 ------------ packages/0x.js/CHANGELOG.md | 531 ----- packages/0x.js/README.md | 102 - packages/0x.js/coverage/.gitkeep | 0 packages/0x.js/package.json | 94 - packages/0x.js/src/index.ts | 124 -- packages/0x.js/tsconfig.json | 8 - packages/0x.js/tslint.json | 3 - packages/0x.js/typedoc-tsconfig.json | 7 - packages/0x.js/webpack.config.js | 63 - packages/abi-gen-templates/CHANGELOG.json | 38 - packages/abi-gen-templates/CHANGELOG.md | 18 - packages/abi-gen-templates/README.md | 17 - packages/abi-gen-templates/contract.handlebars | 91 - packages/abi-gen-templates/package.json | 20 - .../abi-gen-templates/partials/call.handlebars | 3 - .../partials/callAsync.handlebars | 23 - .../abi-gen-templates/partials/event.handlebars | 5 - .../abi-gen-templates/partials/params.handlebars | 3 - .../partials/return_type.handlebars | 10 - packages/abi-gen-templates/partials/tx.handlebars | 53 - .../partials/typed_params.handlebars | 3 - packages/abi-gen-wrappers/CHANGELOG.json | 132 -- packages/abi-gen-wrappers/CHANGELOG.md | 58 - packages/abi-gen-wrappers/README.md | 73 - packages/abi-gen-wrappers/package.json | 50 - .../src/generated-wrappers/asset_proxy_owner.ts | 1494 ------------- .../src/generated-wrappers/dummy_erc20_token.ts | 828 ------- .../src/generated-wrappers/dummy_erc721_token.ts | 1006 --------- .../src/generated-wrappers/dutch_auction.ts | 250 --- .../src/generated-wrappers/erc20_proxy.ts | 530 ----- .../src/generated-wrappers/erc20_token.ts | 433 ---- .../src/generated-wrappers/erc721_proxy.ts | 530 ----- .../src/generated-wrappers/erc721_token.ts | 668 ------ .../src/generated-wrappers/exchange.ts | 2279 -------------------- .../src/generated-wrappers/forwarder.ts | 523 ----- .../src/generated-wrappers/i_validator.ts | 96 - .../src/generated-wrappers/i_wallet.ts | 94 - .../src/generated-wrappers/multi_asset_proxy.ts | 669 ------ .../src/generated-wrappers/order_validator.ts | 288 --- .../src/generated-wrappers/weth9.ts | 668 ------ .../src/generated-wrappers/zrx_token.ts | 511 ----- packages/abi-gen-wrappers/src/index.ts | 16 - packages/abi-gen-wrappers/tsconfig.json | 8 - packages/abi-gen-wrappers/tslint.json | 3 - packages/abi-gen/.npmignore | 6 - packages/abi-gen/CHANGELOG.json | 398 ---- packages/abi-gen/CHANGELOG.md | 169 -- packages/abi-gen/README.md | 104 - packages/abi-gen/bin/abi-gen.js | 2 - packages/abi-gen/coverage/.gitkeep | 0 packages/abi-gen/package.json | 68 - packages/abi-gen/src/globals.d.ts | 6 - packages/abi-gen/src/index.ts | 152 -- packages/abi-gen/src/types.ts | 24 - packages/abi-gen/src/utils.ts | 119 - packages/abi-gen/test/utils_test.ts | 86 - packages/abi-gen/tsconfig.json | 8 - packages/abi-gen/tslint.json | 3 - packages/assert/.npmignore | 7 - packages/assert/CHANGELOG.json | 373 ---- packages/assert/CHANGELOG.md | 164 -- packages/assert/README.md | 77 - packages/assert/coverage/.gitkeep | 0 packages/assert/package.json | 56 - packages/assert/src/globals.d.ts | 6 - packages/assert/src/index.ts | 97 - packages/assert/test/assert_test.ts | 255 --- packages/assert/tsconfig.json | 8 - packages/assert/tslint.json | 3 - packages/asset-buyer/.npmignore | 8 - packages/asset-buyer/CHANGELOG.json | 243 --- packages/asset-buyer/CHANGELOG.md | 94 - packages/asset-buyer/README.md | 83 - packages/asset-buyer/package.json | 74 - packages/asset-buyer/src/asset_buyer.ts | 365 ---- packages/asset-buyer/src/constants.ts | 40 - packages/asset-buyer/src/errors.ts | 22 - packages/asset-buyer/src/globals.d.ts | 6 - packages/asset-buyer/src/index.ts | 29 - .../src/order_providers/basic_order_provider.ts | 41 - .../standard_relayer_api_order_provider.ts | 111 - packages/asset-buyer/src/types.ts | 142 -- packages/asset-buyer/src/utils/assert.ts | 39 - packages/asset-buyer/src/utils/asset_data_utils.ts | 12 - .../asset-buyer/src/utils/buy_quote_calculator.ts | 221 -- .../asset-buyer/src/utils/calculate_liquidity.ts | 34 - .../src/utils/order_provider_response_processor.ts | 171 -- packages/asset-buyer/src/utils/order_utils.ts | 74 - packages/asset-buyer/test/asset_buyer_test.ts | 212 -- .../asset-buyer/test/buy_quote_calculator_test.ts | 295 --- packages/asset-buyer/test/utils/chai_setup.ts | 13 - packages/asset-buyer/test/utils/mocks.ts | 68 - packages/asset-buyer/test/utils/test_helpers.ts | 26 - packages/asset-buyer/tsconfig.json | 8 - packages/asset-buyer/tslint.json | 3 - packages/asset-buyer/typedoc-tsconfig.json | 7 - packages/base-contract/.npmignore | 6 - packages/base-contract/CHANGELOG.json | 370 ---- packages/base-contract/CHANGELOG.md | 161 -- packages/base-contract/README.md | 63 - packages/base-contract/coverage/.gitkeep | 0 packages/base-contract/package.json | 53 - packages/base-contract/src/globals.d.ts | 6 - packages/base-contract/src/index.ts | 174 -- packages/base-contract/src/utils.ts | 25 - packages/base-contract/test/base_contract_test.ts | 114 - packages/base-contract/test/utils_test.ts | 108 - packages/base-contract/tsconfig.json | 8 - packages/base-contract/tslint.json | 3 - packages/connect/.npmignore | 8 - packages/connect/CHANGELOG.json | 471 ---- packages/connect/CHANGELOG.md | 201 -- packages/connect/README.md | 74 - packages/connect/coverage/.gitkeep | 0 packages/connect/package.json | 86 - packages/connect/src/globals.d.ts | 4 - packages/connect/src/http_client.ts | 210 -- packages/connect/src/index.ts | 20 - packages/connect/src/orders_channel_factory.ts | 29 - packages/connect/src/types.ts | 48 - packages/connect/src/utils/assert.ts | 25 - .../src/utils/orders_channel_message_parser.ts | 37 - .../src/utils/relayer_response_json_parsers.ts | 50 - packages/connect/src/utils/type_converters.ts | 26 - packages/connect/src/ws_orders_channel.ts | 102 - .../fixtures/standard_relayer_api/asset_pairs.json | 21 - .../fixtures/standard_relayer_api/asset_pairs.ts | 25 - .../standard_relayer_api/fee_recipients.json | 10 - .../standard_relayer_api/fee_recipients.ts | 12 - ...77fa9ac94a50f016026fd13f42990861238897721f.json | 19 - ...f977fa9ac94a50f016026fd13f42990861238897721f.ts | 21 - .../standard_relayer_api/order_config.json | 6 - .../fixtures/standard_relayer_api/order_config.ts | 10 - .../fixtures/standard_relayer_api/orderbook.json | 54 - .../fixtures/standard_relayer_api/orderbook.ts | 58 - .../test/fixtures/standard_relayer_api/orders.json | 26 - .../test/fixtures/standard_relayer_api/orders.ts | 30 - .../unknown_orders_channel_message.ts | 10 - .../update_orders_channel_message.ts | 17 - packages/connect/test/http_client_test.ts | 193 -- .../connect/test/orders_channel_factory_test.ts | 34 - .../test/orders_channel_message_parsers_test.ts | 59 - packages/connect/test/ws_orders_channel_test.ts | 49 - packages/connect/tsconfig.json | 8 - packages/connect/tslint.json | 3 - packages/connect/typedoc-tsconfig.json | 7 - packages/contract-addresses/CHANGELOG.json | 73 - packages/contract-addresses/CHANGELOG.md | 35 - packages/contract-addresses/README.md | 68 - packages/contract-addresses/package.json | 37 - packages/contract-addresses/src/index.ts | 98 - packages/contract-addresses/tsconfig.json | 8 - packages/contract-addresses/tslint.json | 3 - packages/contract-artifacts/CHANGELOG.json | 60 - packages/contract-artifacts/CHANGELOG.md | 30 - packages/contract-artifacts/README.md | 67 - .../artifacts/AssetProxyOwner.json | 699 ------ .../artifacts/DummyERC20Token.json | 328 --- .../artifacts/DummyERC721Token.json | 375 ---- .../contract-artifacts/artifacts/DutchAuction.json | 310 --- .../contract-artifacts/artifacts/ERC20Proxy.json | 195 -- .../contract-artifacts/artifacts/ERC20Token.json | 189 -- .../contract-artifacts/artifacts/ERC721Proxy.json | 195 -- .../contract-artifacts/artifacts/ERC721Token.json | 268 --- .../contract-artifacts/artifacts/Exchange.json | 1981 ----------------- .../contract-artifacts/artifacts/Forwarder.json | 447 ---- .../contract-artifacts/artifacts/IValidator.json | 41 - packages/contract-artifacts/artifacts/IWallet.json | 37 - .../artifacts/MultiAssetProxy.json | 263 --- .../artifacts/OrderValidator.json | 572 ----- packages/contract-artifacts/artifacts/WETH9.json | 293 --- .../contract-artifacts/artifacts/ZRXToken.json | 227 -- packages/contract-artifacts/package.json | 33 - packages/contract-artifacts/src/index.ts | 35 - packages/contract-artifacts/tsconfig.json | 27 - packages/contract-artifacts/tslint.json | 3 - packages/contract-wrappers/.npmignore | 11 - packages/contract-wrappers/CHANGELOG.json | 414 ---- packages/contract-wrappers/CHANGELOG.md | 164 -- packages/contract-wrappers/README.md | 89 - packages/contract-wrappers/coverage/.gitkeep | 0 packages/contract-wrappers/package.json | 92 - ...tract_balance_and_proxy_allowance_lazy_store.ts | 11 - .../contract-wrappers/src/contract_wrappers.ts | 171 -- .../src/contract_wrappers/contract_wrapper.ts | 198 -- .../src/contract_wrappers/dutch_auction_wrapper.ts | 182 -- .../src/contract_wrappers/erc20_proxy_wrapper.ts | 77 - .../src/contract_wrappers/erc20_token_wrapper.ts | 443 ---- .../src/contract_wrappers/erc721_proxy_wrapper.ts | 77 - .../src/contract_wrappers/erc721_token_wrapper.ts | 470 ---- .../src/contract_wrappers/ether_token_wrapper.ts | 211 -- .../src/contract_wrappers/exchange_wrapper.ts | 1231 ----------- .../src/contract_wrappers/forwarder_wrapper.ts | 254 --- .../contract_wrappers/order_validator_wrapper.ts | 185 -- .../asset_balance_and_proxy_allowance_fetcher.ts | 91 - .../src/fetchers/order_filled_cancelled_fetcher.ts | 39 - packages/contract-wrappers/src/index.ts | 101 - .../src/schemas/contract_wrappers_config_schema.ts | 25 - .../src/schemas/method_opts_schema.ts | 7 - .../src/schemas/order_tx_opts_schema.ts | 8 - .../src/schemas/tx_opts_schema.ts | 9 - .../schemas/validate_order_fillable_opts_schema.ts | 7 - packages/contract-wrappers/src/types.ts | 218 -- packages/contract-wrappers/src/utils/assert.ts | 90 - .../src/utils/calldata_optimization_utils.ts | 44 - packages/contract-wrappers/src/utils/constants.ts | 19 - .../src/utils/contract_addresses.ts | 15 - packages/contract-wrappers/src/utils/decorators.ts | 110 - .../src/utils/exchange_transfer_simulator.ts | 111 - .../contract-wrappers/src/utils/filter_utils.ts | 87 - .../src/utils/transaction_encoder.ts | 281 --- packages/contract-wrappers/src/utils/utils.ts | 23 - .../test/calldata_optimization_utils_test.ts | 59 - .../test/dutch_auction_wrapper_test.ts | 128 -- .../test/erc20_proxy_wrapper_test.ts | 39 - .../contract-wrappers/test/erc20_wrapper_test.ts | 634 ------ .../test/erc721_proxy_wrapper_test.ts | 39 - .../contract-wrappers/test/erc721_wrapper_test.ts | 466 ---- .../test/ether_token_wrapper_test.ts | 437 ---- .../test/exchange_wrapper_test.ts | 528 ----- .../test/forwarder_wrapper_test.ts | 167 -- packages/contract-wrappers/test/global_hooks.ts | 6 - .../test/order_validator_wrapper_test.ts | 146 -- .../test/revert_validation_test.ts | 115 - .../contract-wrappers/test/subscription_test.ts | 75 - .../test/transaction_encoder_test.ts | 210 -- .../contract-wrappers/test/utils/chai_setup.ts | 13 - packages/contract-wrappers/test/utils/constants.ts | 19 - .../test/utils/dutch_auction_utils.ts | 153 -- packages/contract-wrappers/test/utils/migrate.ts | 18 - .../contract-wrappers/test/utils/token_utils.ts | 35 - .../contract-wrappers/test/utils/web3_wrapper.ts | 12 - packages/contract-wrappers/tsconfig.json | 8 - packages/contract-wrappers/tslint.json | 3 - packages/contract-wrappers/typedoc-tsconfig.json | 7 - packages/dev-tools-pages/.gitignore | 1 - packages/dev-tools-pages/README.md | 88 - packages/dev-tools-pages/assets/crawl.html | 17 - .../dev-tools-pages/assets/favicons/compiler.ico | Bin 6518 -> 0 bytes packages/dev-tools-pages/assets/favicons/cov.ico | Bin 6518 -> 0 bytes .../dev-tools-pages/assets/favicons/profiler.ico | Bin 6518 -> 0 bytes packages/dev-tools-pages/assets/favicons/trace.ico | Bin 6518 -> 0 bytes .../assets/fonts/MaisonNeue-Bold-subset.woff2 | Bin 11248 -> 0 bytes .../assets/fonts/MaisonNeue-Book-subset.woff2 | Bin 11232 -> 0 bytes .../dev-tools-pages/assets/images/og-compiler.png | Bin 14494 -> 0 bytes packages/dev-tools-pages/assets/images/og-cov.png | Bin 13336 -> 0 bytes .../dev-tools-pages/assets/images/og-profiler.png | Bin 13717 -> 0 bytes .../dev-tools-pages/assets/images/og-trace.png | Bin 13670 -> 0 bytes packages/dev-tools-pages/assets/index.html | 14 - packages/dev-tools-pages/package.json | 78 - packages/dev-tools-pages/pages.js | 72 - .../ts/components/animations/compiler/data.json | 1 - .../ts/components/animations/compiler/index.tsx | 11 - .../ts/components/animations/cov/data.json | 1 - .../ts/components/animations/cov/index.tsx | 11 - .../ts/components/animations/index.tsx | 93 - .../ts/components/animations/profiler/data.json | 1 - .../ts/components/animations/profiler/index.tsx | 11 - .../ts/components/animations/trace/data.json | 1 - .../ts/components/animations/trace/index.tsx | 11 - packages/dev-tools-pages/ts/components/base.tsx | 26 - .../dev-tools-pages/ts/components/breakout.tsx | 12 - packages/dev-tools-pages/ts/components/button.tsx | 52 - .../ts/components/call_to_action.tsx | 40 - packages/dev-tools-pages/ts/components/code.tsx | 197 -- .../dev-tools-pages/ts/components/compiler.tsx | 94 - .../dev-tools-pages/ts/components/container.tsx | 13 - .../ts/components/content-block.tsx | 78 - packages/dev-tools-pages/ts/components/content.tsx | 31 - packages/dev-tools-pages/ts/components/footer.tsx | 137 -- packages/dev-tools-pages/ts/components/header.tsx | 76 - packages/dev-tools-pages/ts/components/hero.tsx | 63 - .../dev-tools-pages/ts/components/inline-code.tsx | 20 - packages/dev-tools-pages/ts/components/intro.tsx | 70 - packages/dev-tools-pages/ts/components/list.tsx | 50 - packages/dev-tools-pages/ts/components/tabs.tsx | 66 - packages/dev-tools-pages/ts/components/trace.tsx | 213 -- .../dev-tools-pages/ts/components/typography.tsx | 33 - packages/dev-tools-pages/ts/context/compiler.tsx | 20 - packages/dev-tools-pages/ts/context/coverage.tsx | 20 - packages/dev-tools-pages/ts/context/index.tsx | 22 - packages/dev-tools-pages/ts/context/profiler.tsx | 20 - packages/dev-tools-pages/ts/context/trace.tsx | 20 - packages/dev-tools-pages/ts/globalStyles.tsx | 87 - packages/dev-tools-pages/ts/globals.d.ts | 24 - packages/dev-tools-pages/ts/highlight.tsx | 67 - .../dev-tools-pages/ts/icons/exact-location.svg | 1 - packages/dev-tools-pages/ts/icons/logos/0x.svg | 1 - .../dev-tools-pages/ts/icons/logos/compiler.svg | 3 - packages/dev-tools-pages/ts/icons/logos/cov.svg | 3 - .../dev-tools-pages/ts/icons/logos/profiler.svg | 3 - packages/dev-tools-pages/ts/icons/logos/trace.svg | 1 - packages/dev-tools-pages/ts/icons/no-location.svg | 1 - .../dev-tools-pages/ts/icons/time-consuming.svg | 1 - packages/dev-tools-pages/ts/icons/time-saving.svg | 1 - packages/dev-tools-pages/ts/pages/compiler.tsx | 182 -- packages/dev-tools-pages/ts/pages/coverage.tsx | 179 -- packages/dev-tools-pages/ts/pages/profiler.tsx | 176 -- packages/dev-tools-pages/ts/pages/trace.tsx | 147 -- packages/dev-tools-pages/ts/variables.tsx | 34 - packages/dev-tools-pages/tsconfig.json | 22 - packages/dev-tools-pages/tslint.json | 10 - packages/dev-tools-pages/webpack.config.js | 115 - packages/dev-utils/.npmignore | 7 - packages/dev-utils/CHANGELOG.json | 408 ---- packages/dev-utils/CHANGELOG.md | 175 -- packages/dev-utils/README.md | 95 - packages/dev-utils/coverage/.gitkeep | 0 packages/dev-utils/package.json | 57 - packages/dev-utils/src/blockchain_lifecycle.ts | 98 - packages/dev-utils/src/callback_error_reporter.ts | 77 - packages/dev-utils/src/constants.ts | 6 - packages/dev-utils/src/env.ts | 26 - packages/dev-utils/src/globals.d.ts | 6 - packages/dev-utils/src/index.ts | 5 - packages/dev-utils/src/web3_factory.ts | 71 - packages/dev-utils/test/.npmignore | 5 - .../dev-utils/test/blockchain_lifecycle_test.ts | 26 - packages/dev-utils/test/rpc_test.ts | 43 - packages/dev-utils/tsconfig.json | 8 - packages/dev-utils/tslint.json | 6 - packages/devnet/Dockerfile | 25 - packages/devnet/README.md | 110 - packages/devnet/genesis.json | 60 - ...3751Z--5409ed021d9299bf6814279a6a1411a7e866a631 | 1 - ...3183Z--6ecbe1db9ef729cbe972c83fb886247691fb6beb | 1 - ...1411Z--e36ea790bc9d7ab70c55260c66d52b1eca985f84 | 1 - ...8556Z--e834ec434daba538cd1b9fe1582052b880bd7e63 | 1 - ...8580Z--78dc5d2d739606d31509c31d654056a45185ecb6 | 1 - ...4829Z--a8dda8d7f5310e4a9e24f8eba77e091ac264f872 | 1 - ...9696Z--06cef8e666768cc40cc78cf93d9611019ddcb628 | 1 - ...0386Z--4404ac8bd8f9618d27ad2f1485aa1b2cfd82482d | 1 - ...3052Z--7457d5e02197480db681d3fdf256c7aca21bdc12 | 1 - ...1541Z--91c987bf62d25945db517bdaa840a6c661374402 | 1 - ...7737Z--e8816898d851d5b61b7f950627d04d794c07ca37 | 1 - packages/devnet/node0/password.txt | 11 - packages/devnet/run.sh | 25 - packages/ethereum-types/.npmignore | 6 - packages/ethereum-types/CHANGELOG.json | 201 -- packages/ethereum-types/CHANGELOG.md | 88 - packages/ethereum-types/README.md | 61 - packages/ethereum-types/package.json | 45 - packages/ethereum-types/src/globals.d.ts | 6 - packages/ethereum-types/src/index.ts | 521 ----- packages/ethereum-types/tsconfig.json | 9 - packages/ethereum-types/tslint.json | 3 - packages/ethereum-types/typedoc-tsconfig.json | 8 - packages/fill-scenarios/.npmignore | 6 - packages/fill-scenarios/CHANGELOG.json | 307 --- packages/fill-scenarios/CHANGELOG.md | 135 -- packages/fill-scenarios/README.md | 63 - packages/fill-scenarios/package.json | 46 - packages/fill-scenarios/src/constants.ts | 4 - packages/fill-scenarios/src/fill_scenarios.ts | 296 --- packages/fill-scenarios/src/index.ts | 1 - packages/fill-scenarios/tsconfig.json | 8 - packages/fill-scenarios/tslint.json | 3 - packages/instant/.DS_Store | Bin 8196 -> 0 bytes packages/instant/.dogfood.discharge.json | 13 - packages/instant/.env_example | 7 - packages/instant/.gitignore | 4 - packages/instant/.npmignore | 6 - packages/instant/.production.discharge.json | 13 - packages/instant/.staging.discharge.json | 13 - packages/instant/CHANGELOG.json | 29 - packages/instant/CHANGELOG.md | 10 - packages/instant/README.md | 110 - packages/instant/jest.config.js | 10 - packages/instant/package.json | 104 - packages/instant/public/external.css | 29 - packages/instant/public/index.html | 207 -- packages/instant/src/assets/icons/ae.svg | 4 - packages/instant/src/assets/icons/agi.svg | 5 - packages/instant/src/assets/icons/ant.svg | 5 - packages/instant/src/assets/icons/ast.svg | 4 - packages/instant/src/assets/icons/bat.svg | 3 - packages/instant/src/assets/icons/cvc.svg | 4 - packages/instant/src/assets/icons/dai.svg | 5 - packages/instant/src/assets/icons/dgd.svg | 5 - packages/instant/src/assets/icons/dgx.svg | 4 - packages/instant/src/assets/icons/dnt.svg | 4 - packages/instant/src/assets/icons/fun.svg | 4 - packages/instant/src/assets/icons/gno.svg | 6 - packages/instant/src/assets/icons/gnt.svg | 3 - packages/instant/src/assets/icons/knc.svg | 6 - packages/instant/src/assets/icons/link.svg | 6 - packages/instant/src/assets/icons/lpt.svg | 8 - packages/instant/src/assets/icons/mana.svg | 8 - packages/instant/src/assets/icons/mkr.svg | 4 - packages/instant/src/assets/icons/mln.svg | 4 - packages/instant/src/assets/icons/omg.svg | 3 - packages/instant/src/assets/icons/powr.svg | 6 - packages/instant/src/assets/icons/ren.svg | 12 - packages/instant/src/assets/icons/rep.svg | 7 - packages/instant/src/assets/icons/req.svg | 3 - packages/instant/src/assets/icons/salt.svg | 3 - packages/instant/src/assets/icons/snt.svg | 4 - packages/instant/src/assets/icons/spank.svg | 6 - packages/instant/src/assets/icons/wax.svg | 4 - packages/instant/src/assets/icons/zil.svg | 3 - packages/instant/src/assets/icons/zrx.svg | 6 - packages/instant/src/assets/powered_by_0x.svg | 17 - .../instant/src/components/amount_placeholder.tsx | 34 - .../src/components/animations/full_rotation.tsx | 21 - .../components/animations/position_animation.tsx | 107 - .../instant/src/components/animations/pulse.tsx | 15 - .../src/components/animations/slide_animation.tsx | 34 - packages/instant/src/components/buy_button.tsx | 120 -- .../instant/src/components/buy_order_progress.tsx | 35 - .../src/components/buy_order_state_buttons.tsx | 75 - .../src/components/coinbase_wallet_logo.tsx | 23 - packages/instant/src/components/css_reset.tsx | 32 - .../src/components/erc20_asset_amount_input.tsx | 166 -- .../src/components/erc20_token_selector.tsx | 176 -- .../components/install_wallet_panel_content.tsx | 75 - .../instant/src/components/instant_heading.tsx | 149 -- packages/instant/src/components/meta_mask_logo.tsx | 80 - packages/instant/src/components/order_details.tsx | 230 -- packages/instant/src/components/payment_method.tsx | 110 - .../src/components/payment_method_dropdown.tsx | 60 - .../src/components/placing_order_button.tsx | 18 - .../src/components/scaling_amount_input.tsx | 92 - packages/instant/src/components/scaling_input.tsx | 165 -- packages/instant/src/components/search_input.tsx | 29 - .../instant/src/components/secondary_button.tsx | 27 - packages/instant/src/components/section_header.tsx | 21 - packages/instant/src/components/sliding_error.tsx | 100 - packages/instant/src/components/sliding_panel.tsx | 73 - .../src/components/standard_panel_content.tsx | 75 - .../src/components/standard_sliding_panel.tsx | 29 - packages/instant/src/components/time_counter.tsx | 78 - .../instant/src/components/timed_progress_bar.tsx | 106 - packages/instant/src/components/ui/button.tsx | 87 - packages/instant/src/components/ui/circle.tsx | 26 - packages/instant/src/components/ui/container.tsx | 104 - packages/instant/src/components/ui/dropdown.tsx | 147 -- packages/instant/src/components/ui/flex.tsx | 38 - packages/instant/src/components/ui/icon.tsx | 129 -- packages/instant/src/components/ui/input.tsx | 46 - packages/instant/src/components/ui/overlay.tsx | 36 - packages/instant/src/components/ui/spinner.tsx | 30 - packages/instant/src/components/ui/text.tsx | 71 - packages/instant/src/components/wallet_prompt.tsx | 49 - .../instant/src/components/zero_ex_instant.tsx | 21 - .../src/components/zero_ex_instant_container.tsx | 112 - .../src/components/zero_ex_instant_overlay.tsx | 53 - .../src/components/zero_ex_instant_provider.tsx | 156 -- packages/instant/src/constants.ts | 79 - .../containers/available_erc20_token_selector.ts | 45 - .../containers/connected_account_payment_method.ts | 94 - ...nected_buy_order_progress_or_payment_method.tsx | 35 - .../containers/current_standard_sliding_panel.ts | 31 - .../containers/latest_buy_quote_order_details.ts | 41 - packages/instant/src/containers/latest_error.tsx | 68 - .../selected_asset_buy_order_progress.ts | 13 - .../selected_asset_buy_order_state_buttons.ts | 113 - .../containers/selected_asset_instant_heading.ts | 34 - .../containers/selected_asset_theme_provider.ts | 32 - .../selected_erc20_asset_amount_input.ts | 122 -- .../instant/src/data/asset_data_network_mapping.ts | 66 - packages/instant/src/data/asset_meta_data_map.ts | 202 -- packages/instant/src/globals.d.ts | 12 - packages/instant/src/index.ts | 2 - packages/instant/src/index.umd.ts | 169 -- packages/instant/src/redux/actions.ts | 76 - packages/instant/src/redux/analytics_middleware.ts | 108 - packages/instant/src/redux/async_data.ts | 120 -- packages/instant/src/redux/reducer.ts | 297 --- packages/instant/src/redux/store.ts | 15 - packages/instant/src/style/fonts.ts | 10 - packages/instant/src/style/media.ts | 51 - packages/instant/src/style/theme.ts | 56 - packages/instant/src/style/util.ts | 11 - packages/instant/src/style/z_index.ts | 9 - packages/instant/src/types.ts | 206 -- packages/instant/src/util/address.ts | 6 - packages/instant/src/util/analytics.ts | 248 --- packages/instant/src/util/assert.ts | 55 - packages/instant/src/util/asset.ts | 146 -- packages/instant/src/util/asset_buyer_factory.ts | 17 - packages/instant/src/util/buy_quote_updater.ts | 61 - packages/instant/src/util/coinbase_api.ts | 11 - packages/instant/src/util/env.ts | 77 - packages/instant/src/util/error_flasher.ts | 26 - packages/instant/src/util/error_reporter.ts | 79 - packages/instant/src/util/etherscan.ts | 30 - packages/instant/src/util/format.ts | 76 - packages/instant/src/util/gas_price_estimator.ts | 65 - packages/instant/src/util/heap.ts | 116 - packages/instant/src/util/heartbeater.ts | 35 - packages/instant/src/util/heartbeater_factory.ts | 30 - packages/instant/src/util/maybe_big_number.ts | 25 - packages/instant/src/util/provider_factory.ts | 34 - .../instant/src/util/provider_state_factory.ts | 90 - packages/instant/src/util/time.ts | 39 - packages/instant/src/util/util.ts | 6 - .../test/components/zero_ex_instant.test.tsx | 15 - packages/instant/test/util/asset.test.ts | 114 - packages/instant/test/util/format.test.ts | 117 - packages/instant/test/util/time.test.ts | 48 - packages/instant/tsconfig.json | 14 - packages/instant/tslint.json | 9 - packages/instant/typedoc-tsconfig.json | 7 - packages/instant/webpack.config.js | 176 -- packages/json-schemas/.npmignore | 8 - packages/json-schemas/CHANGELOG.json | 381 ---- packages/json-schemas/CHANGELOG.md | 163 -- packages/json-schemas/README.md | 83 - packages/json-schemas/coverage/.gitkeep | 0 packages/json-schemas/package.json | 68 - packages/json-schemas/schemas/address_schema.json | 5 - .../schemas/asset_pairs_request_opts_schema.json | 8 - .../json-schemas/schemas/block_param_schema.json | 11 - .../json-schemas/schemas/block_range_schema.json | 8 - .../json-schemas/schemas/call_data_schema.json | 27 - .../schemas/ec_signature_parameter_schema.json | 5 - .../json-schemas/schemas/ec_signature_schema.json | 14 - .../schemas/eip712_typed_data_schema.json | 28 - packages/json-schemas/schemas/hex_schema.json | 5 - .../schemas/index_filter_values_schema.json | 7 - .../json-schemas/schemas/js_number_schema.json | 5 - packages/json-schemas/schemas/number_schema.json | 5 - .../json-schemas/schemas/order_cancel_schema.json | 12 - .../schemas/order_config_request_schema.json | 24 - .../order_fill_or_kill_requests_schema.json | 12 - .../schemas/order_fill_requests_schema.json | 12 - .../json-schemas/schemas/order_hash_schema.json | 5 - packages/json-schemas/schemas/order_schema.json | 34 - .../order_watcher_web_socket_request_schema.json | 52 - ...der_watcher_web_socket_utf8_message_schema.json | 10 - .../schemas/orderbook_request_schema.json | 9 - .../schemas/orders_request_opts_schema.json | 19 - packages/json-schemas/schemas/orders_schema.json | 5 - .../schemas/paged_request_opts_schema.json | 8 - .../schemas/paginated_collection_schema.json | 10 - ...layer_api_asset_data_pairs_response_schema.json | 13 - .../relayer_api_asset_data_pairs_schema.json | 12 - .../relayer_api_asset_data_trade_info_schema.json | 11 - .../schemas/relayer_api_error_response_schema.json | 21 - ...relayer_api_fee_recipients_response_schema.json | 16 - .../relayer_api_order_config_payload_schema.json | 24 - .../relayer_api_order_config_response_schema.json | 11 - .../schemas/relayer_api_order_schema.json | 9 - .../relayer_api_orderbook_response_schema.json | 9 - ...pi_orders_channel_subscribe_payload_schema.json | 14 - ...elayer_api_orders_channel_subscribe_schema.json | 11 - ..._api_orders_channel_update_response_schema.json | 11 - .../relayer_api_orders_response_schema.json | 13 - .../schemas/relayer_api_orders_schema.json | 5 - .../json-schemas/schemas/request_opts_schema.json | 7 - .../json-schemas/schemas/signed_order_schema.json | 12 - .../json-schemas/schemas/signed_orders_schema.json | 5 - packages/json-schemas/schemas/token_schema.json | 11 - packages/json-schemas/schemas/tx_data_schema.json | 26 - .../json-schemas/schemas/whole_number_schema.json | 12 - .../schemas/zero_ex_transaction_schema.json | 10 - packages/json-schemas/src/index.ts | 4 - packages/json-schemas/src/schema_validator.ts | 61 - packages/json-schemas/src/schemas.ts | 95 - packages/json-schemas/test/schema_test.ts | 872 -------- packages/json-schemas/tsconfig.json | 57 - packages/json-schemas/tslint.json | 3 - packages/json-schemas/typedoc-tsconfig.json | 7 - packages/metacoin/README.md | 97 - packages/metacoin/compiler.json | 15 - packages/metacoin/contracts/Metacoin.sol | 40 - packages/metacoin/coverage/.gitkeep | 0 packages/metacoin/package.json | 64 - packages/metacoin/src/global.d.ts | 4 - packages/metacoin/test/global_hooks.ts | 15 - packages/metacoin/test/metacoin_test.ts | 120 -- packages/metacoin/test/utils/chai_setup.ts | 13 - packages/metacoin/test/utils/config.ts | 12 - packages/metacoin/test/utils/coverage.ts | 21 - packages/metacoin/test/utils/profiler.ts | 27 - packages/metacoin/test/utils/web3_wrapper.ts | 76 - packages/metacoin/tsconfig.json | 16 - packages/metacoin/tslint.json | 3 - packages/migrations/.gitignore | 2 - packages/migrations/CHANGELOG.json | 340 --- packages/migrations/CHANGELOG.md | 148 -- packages/migrations/Dockerfile | 15 - packages/migrations/README.md | 100 - packages/migrations/bin/0x-migrate.js | 2 - packages/migrations/package.json | 72 - packages/migrations/src/cli.ts | 38 - packages/migrations/src/index.ts | 11 - packages/migrations/src/migrate.ts | 23 - packages/migrations/src/migrate_snapshot.ts | 32 - packages/migrations/src/migration.ts | 232 -- packages/migrations/src/types.ts | 29 - packages/migrations/src/utils/constants.ts | 18 - packages/migrations/src/utils/provider_factory.ts | 39 - packages/migrations/src/utils/token_info.ts | 62 - packages/migrations/tsconfig.json | 8 - packages/migrations/tslint.json | 3 - packages/migrations/typedoc-tsconfig.json | 7 - packages/monorepo-scripts/src/prepublish_checks.ts | 22 - packages/order-utils/.npmignore | 7 - packages/order-utils/CHANGELOG.json | 424 ---- packages/order-utils/CHANGELOG.md | 172 -- packages/order-utils/README.md | 65 - packages/order-utils/coverage/.gitkeep | 0 packages/order-utils/package.json | 76 - ...abstract_balance_and_proxy_allowance_fetcher.ts | 23 - ...tract_balance_and_proxy_allowance_lazy_store.ts | 11 - .../abstract_order_filled_cancelled_fetcher.ts | 23 - .../abstract_order_filled_cancelled_lazy_store.ts | 13 - packages/order-utils/src/assert.ts | 37 - packages/order-utils/src/asset_data_utils.ts | 308 --- packages/order-utils/src/constants.ts | 109 - packages/order-utils/src/crypto.ts | 47 - packages/order-utils/src/eip712_utils.ts | 83 - .../order-utils/src/exchange_transfer_simulator.ts | 153 -- packages/order-utils/src/index.ts | 63 - packages/order-utils/src/market_utils.ts | 162 -- packages/order-utils/src/order_factory.ts | 122 -- packages/order-utils/src/order_hash.ts | 58 - packages/order-utils/src/order_state_utils.ts | 346 --- packages/order-utils/src/order_validation_utils.ts | 257 --- packages/order-utils/src/parsing_utils.ts | 27 - packages/order-utils/src/rate_utils.ts | 48 - .../src/remaining_fillable_calculator.ts | 86 - packages/order-utils/src/salt.ts | 18 - packages/order-utils/src/signature_utils.ts | 417 ---- packages/order-utils/src/sorting_utils.ts | 54 - .../balance_and_proxy_allowance_lazy_store.ts | 140 -- .../src/store/order_filled_cancelled_lazy_store.ts | 113 - packages/order-utils/src/types.ts | 66 - packages/order-utils/src/utils.ts | 22 - packages/order-utils/test/assert_test.ts | 34 - packages/order-utils/test/asset_data_utils_test.ts | 110 - packages/order-utils/test/eip712_utils_test.ts | 44 - .../test/exchange_transfer_simulator_test.ts | 174 -- packages/order-utils/test/market_utils_test.ts | 267 --- packages/order-utils/test/order_hash_test.ts | 77 - .../order-utils/test/order_state_utils_test.ts | 145 -- .../test/order_validation_utils_test.ts | 70 - packages/order-utils/test/rate_utils_test.ts | 55 - .../test/remaining_fillable_calculator_test.ts | 246 --- packages/order-utils/test/signature_utils_test.ts | 324 --- packages/order-utils/test/sorting_utils_test.ts | 67 - packages/order-utils/test/utils/chai_setup.ts | 13 - ...le_erc20_balance_and_proxy_allowance_fetcher.ts | 25 - .../order-utils/test/utils/test_order_factory.ts | 33 - packages/order-utils/test/utils/web3_wrapper.ts | 8 - packages/order-utils/tsconfig.json | 8 - packages/order-utils/tslint.json | 3 - packages/order-utils/typedoc-tsconfig.json | 7 - packages/order-watcher/.npmignore | 9 - packages/order-watcher/CHANGELOG.json | 385 ---- packages/order-watcher/CHANGELOG.md | 162 -- packages/order-watcher/Dockerfile | 13 - packages/order-watcher/README.md | 167 -- packages/order-watcher/coverage/.gitkeep | 0 packages/order-watcher/package.json | 89 - packages/order-watcher/src/index.ts | 25 - .../collision_resistant_abi_decoder.ts | 54 - .../dependent_order_hashes_tracker.ts | 243 --- .../src/order_watcher/event_watcher.ts | 158 -- .../src/order_watcher/expiration_watcher.ts | 89 - .../src/order_watcher/order_watcher.ts | 490 ----- .../order_watcher_web_socket_server.ts | 200 -- .../schemas/order_watcher_partial_config_schema.ts | 13 - packages/order-watcher/src/server.ts | 44 - packages/order-watcher/src/types.ts | 97 - packages/order-watcher/src/utils/assert.ts | 23 - packages/order-watcher/src/utils/utils.ts | 11 - .../order-watcher/test/expiration_watcher_test.ts | 199 -- packages/order-watcher/test/global_hooks.ts | 6 - packages/order-watcher/test/order_watcher_test.ts | 887 -------- .../test/order_watcher_web_socket_server_test.ts | 312 --- packages/order-watcher/test/utils/chai_setup.ts | 13 - packages/order-watcher/test/utils/constants.ts | 5 - packages/order-watcher/test/utils/migrate.ts | 18 - packages/order-watcher/test/utils/web3_wrapper.ts | 8 - packages/order-watcher/tsconfig.json | 8 - packages/order-watcher/tslint.json | 6 - packages/order-watcher/typedoc-tsconfig.json | 7 - packages/pipeline/.npmignore | 7 - packages/pipeline/README.md | 184 -- packages/pipeline/coverage/.gitkeep | 0 .../migrations/1542070840010-InitialSchema.ts | 187 -- .../1542147915364-NewSraOrderTimestampFormat.ts | 48 - .../1542152278484-RenameSraOrdersFilledAmounts.ts | 13 - .../1542234704666-ConvertBigNumberToNumeric.ts | 53 - .../1542249766882-AddHomepageUrlToRelayers.ts | 14 - .../1542401122477-MakeTakerAddressNullable.ts | 17 - .../1542655823221-NewMetadataAndOHLCVTables.ts | 60 - .../1543434472116-TokenOrderbookSnapshots.ts | 30 - .../migrations/1543446690436-CreateDexTrades.ts | 41 - ...9179-ConvertTokenMetadataDecimalsToBigNumber.ts | 17 - ...324954-ConvertTransactionGasPriceToBigNumber.ts | 19 - .../1544131464368-CreateERC20ApprovalEvents.ts | 26 - ...131658904-TokenOrderbookSnapshotAddOrderType.ts | 33 - .../migrations/1545440485644-CreateCopperTables.ts | 103 - .../migrations/1547153875669-UpdateDDexAPIToV3.ts | 21 - packages/pipeline/package.json | 66 - packages/pipeline/src/data_sources/bloxy/index.ts | 133 -- .../data_sources/contract-wrappers/erc20_events.ts | 45 - .../contract-wrappers/exchange_events.ts | 59 - .../src/data_sources/contract-wrappers/utils.ts | 67 - packages/pipeline/src/data_sources/copper/index.ts | 126 -- packages/pipeline/src/data_sources/ddex/index.ts | 77 - packages/pipeline/src/data_sources/idex/index.ts | 82 - packages/pipeline/src/data_sources/oasis/index.ts | 103 - .../data_sources/ohlcv_external/crypto_compare.ts | 110 - .../pipeline/src/data_sources/paradex/index.ts | 92 - .../src/data_sources/relayer-registry/index.ts | 33 - .../src/data_sources/trusted_tokens/index.ts | 29 - packages/pipeline/src/data_sources/web3/index.ts | 22 - packages/pipeline/src/entities/block.ts | 13 - packages/pipeline/src/entities/copper_activity.ts | 41 - .../pipeline/src/entities/copper_activity_type.ts | 17 - .../pipeline/src/entities/copper_custom_field.ts | 15 - packages/pipeline/src/entities/copper_lead.ts | 38 - .../pipeline/src/entities/copper_opportunity.ts | 45 - packages/pipeline/src/entities/dex_trade.ts | 54 - .../pipeline/src/entities/erc20_approval_event.ts | 26 - .../pipeline/src/entities/exchange_cancel_event.ts | 51 - .../src/entities/exchange_cancel_up_to_event.ts | 26 - .../pipeline/src/entities/exchange_fill_event.ts | 60 - packages/pipeline/src/entities/index.ts | 25 - packages/pipeline/src/entities/ohlcv_external.ts | 30 - packages/pipeline/src/entities/relayer.ts | 21 - packages/pipeline/src/entities/sra_order.ts | 63 - .../src/entities/sra_order_observed_timestamp.ts | 35 - packages/pipeline/src/entities/token_metadata.ts | 22 - packages/pipeline/src/entities/token_order.ts | 28 - packages/pipeline/src/entities/transaction.ts | 19 - packages/pipeline/src/ormconfig.ts | 54 - packages/pipeline/src/parsers/bloxy/index.ts | 53 - packages/pipeline/src/parsers/copper/index.ts | 259 --- packages/pipeline/src/parsers/ddex_orders/index.ts | 69 - .../pipeline/src/parsers/events/erc20_events.ts | 34 - .../pipeline/src/parsers/events/exchange_events.ts | 145 -- packages/pipeline/src/parsers/events/index.ts | 2 - packages/pipeline/src/parsers/idex_orders/index.ts | 81 - .../pipeline/src/parsers/oasis_orders/index.ts | 71 - .../src/parsers/ohlcv_external/crypto_compare.ts | 38 - .../pipeline/src/parsers/paradex_orders/index.ts | 66 - .../pipeline/src/parsers/relayer_registry/index.ts | 37 - packages/pipeline/src/parsers/sra_orders/index.ts | 68 - .../pipeline/src/parsers/token_metadata/index.ts | 46 - packages/pipeline/src/parsers/utils.ts | 28 - packages/pipeline/src/parsers/web3/index.ts | 49 - .../src/scripts/pull_competing_dex_trades.ts | 52 - packages/pipeline/src/scripts/pull_copper.ts | 130 -- .../src/scripts/pull_ddex_orderbook_snapshots.ts | 55 - packages/pipeline/src/scripts/pull_erc20_events.ts | 96 - .../pipeline/src/scripts/pull_exchange_events.ts | 146 -- .../src/scripts/pull_idex_orderbook_snapshots.ts | 63 - .../pipeline/src/scripts/pull_missing_blocks.ts | 91 - .../src/scripts/pull_oasis_orderbook_snapshots.ts | 58 - .../src/scripts/pull_ohlcv_cryptocompare.ts | 96 - .../scripts/pull_paradex_orderbook_snapshots.ts | 87 - .../src/scripts/pull_radar_relay_orders.ts | 62 - .../pipeline/src/scripts/pull_trusted_tokens.ts | 48 - .../pipeline/src/scripts/update_relayer_info.ts | 34 - packages/pipeline/src/types.ts | 9 - packages/pipeline/src/utils/constants.ts | 3 - .../pipeline/src/utils/get_ohlcv_trading_pairs.ts | 116 - packages/pipeline/src/utils/index.ts | 53 - .../src/utils/transformers/asset_proxy_id_types.ts | 20 - .../pipeline/src/utils/transformers/big_number.ts | 16 - packages/pipeline/src/utils/transformers/index.ts | 3 - .../src/utils/transformers/number_to_bigint.ts | 31 - .../data_sources/contract-wrappers/utils_test.ts | 109 - .../ohlcv_external/crypto_compare_test.ts | 47 - packages/pipeline/test/db_global_hooks.ts | 9 - packages/pipeline/test/db_setup.ts | 174 -- packages/pipeline/test/entities/block_test.ts | 23 - packages/pipeline/test/entities/copper_test.ts | 54 - packages/pipeline/test/entities/dex_trades_test.ts | 60 - .../test/entities/erc20_approval_events_test.ts | 29 - .../test/entities/exchange_cancel_event_test.ts | 57 - .../entities/exchange_cancel_up_to_event_test.ts | 29 - .../test/entities/exchange_fill_event_test.ts | 62 - .../pipeline/test/entities/ohlcv_external_test.ts | 35 - packages/pipeline/test/entities/relayer_test.ts | 55 - packages/pipeline/test/entities/sra_order_test.ts | 84 - .../pipeline/test/entities/token_metadata_test.ts | 39 - .../pipeline/test/entities/token_order_test.ts | 31 - .../pipeline/test/entities/transaction_test.ts | 26 - packages/pipeline/test/entities/util.ts | 25 - .../fixtures/copper/api_v1_activity_types.json | 24 - .../test/fixtures/copper/api_v1_activity_types.ts | 16 - .../copper/api_v1_custom_field_definitions.json | 38 - .../copper/api_v1_custom_field_definitions.ts | 39 - .../fixtures/copper/api_v1_list_activities.json | 242 --- .../test/fixtures/copper/api_v1_list_activities.ts | 305 --- .../test/fixtures/copper/api_v1_list_leads.json | 577 ----- .../test/fixtures/copper/api_v1_list_leads.ts | 229 -- .../fixtures/copper/api_v1_list_opportunities.json | 662 ------ .../fixtures/copper/api_v1_list_opportunities.ts | 425 ---- .../test/fixtures/copper/parsed_entities.ts | 5 - packages/pipeline/test/parsers/bloxy/index_test.ts | 98 - .../pipeline/test/parsers/copper/index_test.ts | 87 - .../test/parsers/ddex_orders/index_test.ts | 52 - .../test/parsers/events/erc20_events_test.ts | 54 - .../test/parsers/events/exchange_events_test.ts | 79 - .../test/parsers/idex_orders/index_test.ts | 87 - .../test/parsers/oasis_orders/index_test.ts | 49 - .../parsers/ohlcv_external/crypto_compare_test.ts | 62 - .../test/parsers/paradex_orders/index_test.ts | 54 - .../pipeline/test/parsers/sra_orders/index_test.ts | 69 - packages/pipeline/test/parsers/utils/index_test.ts | 30 - packages/pipeline/test/utils/chai_setup.ts | 13 - packages/pipeline/tsconfig.json | 18 - packages/pipeline/tslint.json | 3 - packages/pipeline/typedoc-tsconfig.json | 10 - packages/react-docs/.npmignore | 6 - packages/react-docs/CHANGELOG.json | 407 ---- packages/react-docs/CHANGELOG.md | 176 -- packages/react-docs/README.md | 96 - packages/react-docs/package.json | 61 - packages/react-docs/src/components/badge.tsx | 55 - packages/react-docs/src/components/comment.tsx | 22 - packages/react-docs/src/components/custom_enum.tsx | 33 - .../react-docs/src/components/doc_reference.tsx | 318 --- packages/react-docs/src/components/enum.tsx | 23 - .../react-docs/src/components/event_definition.tsx | 89 - packages/react-docs/src/components/interface.tsx | 89 - .../react-docs/src/components/property_block.tsx | 78 - packages/react-docs/src/components/signature.tsx | 164 -- .../react-docs/src/components/signature_block.tsx | 153 -- packages/react-docs/src/components/source_link.tsx | 21 - packages/react-docs/src/components/type.tsx | 271 --- .../react-docs/src/components/type_definition.tsx | 188 -- packages/react-docs/src/docs_info.ts | 118 - packages/react-docs/src/globals.d.ts | 6 - packages/react-docs/src/index.ts | 23 - packages/react-docs/src/types.ts | 66 - packages/react-docs/src/utils/constants.ts | 10 - packages/react-docs/src/utils/typedoc_utils.ts | 507 ----- packages/react-docs/tsconfig.json | 14 - packages/react-docs/tslint.json | 9 - packages/react-shared/.npmignore | 6 - packages/react-shared/CHANGELOG.json | 370 ---- packages/react-shared/CHANGELOG.md | 164 -- packages/react-shared/README.md | 63 - packages/react-shared/package.json | 65 - .../react-shared/src/components/anchor_title.tsx | 74 - packages/react-shared/src/components/link.tsx | 150 -- .../src/components/markdown_code_block.tsx | 24 - .../src/components/markdown_link_block.tsx | 47 - .../src/components/markdown_paragraph_block.tsx | 10 - .../src/components/markdown_section.tsx | 106 - .../react-shared/src/components/section_header.tsx | 73 - packages/react-shared/src/globals.d.ts | 6 - packages/react-shared/src/index.ts | 12 - packages/react-shared/src/types.ts | 33 - packages/react-shared/src/utils/colors.ts | 59 - packages/react-shared/src/utils/constants.ts | 19 - packages/react-shared/src/utils/utils.ts | 52 - packages/react-shared/tsconfig.json | 13 - packages/react-shared/tslint.json | 9 - packages/sol-compiler/README.md | 14 +- packages/sol-compiler/package.json | 9 +- packages/sol-compiler/src/compiler.ts | 2 +- packages/sol-compiler/src/solc/bin_paths.ts | 49 +- packages/sol-compiler/src/utils/compiler.ts | 2 +- packages/sol-compiler/src/utils/constants.ts | 2 +- packages/sol-coverage/CHANGELOG.json | 2 +- packages/sol-coverage/CHANGELOG.md | 2 +- packages/sol-coverage/README.md | 12 +- packages/sol-coverage/package.json | 6 +- packages/sol-coverage/src/coverage_subprovider.ts | 2 +- packages/sol-coverage/src/index.ts | 4 +- packages/sol-doc/package.json | 4 +- packages/sol-doc/src/sol_doc.ts | 2 +- packages/sol-profiler/CHANGELOG.json | 2 +- packages/sol-profiler/CHANGELOG.md | 2 +- packages/sol-profiler/README.md | 12 +- packages/sol-profiler/package.json | 6 +- packages/sol-profiler/src/index.ts | 4 +- packages/sol-profiler/src/profiler_subprovider.ts | 2 +- packages/sol-resolver/CHANGELOG.json | 297 --- packages/sol-resolver/CHANGELOG.md | 129 -- packages/sol-resolver/README.md | 67 - packages/sol-resolver/package.json | 40 - packages/sol-resolver/src/globals.d.ts | 7 - packages/sol-resolver/src/index.ts | 10 - .../src/resolvers/enumerable_resolver.ts | 7 - .../src/resolvers/fallthrough_resolver.ts | 21 - packages/sol-resolver/src/resolvers/fs_resolver.ts | 16 - .../sol-resolver/src/resolvers/name_resolver.ts | 66 - .../sol-resolver/src/resolvers/npm_resolver.ts | 42 - .../src/resolvers/relative_fs_resolver.ts | 23 - packages/sol-resolver/src/resolvers/resolver.ts | 14 - .../sol-resolver/src/resolvers/spy_resolver.ts | 25 - .../sol-resolver/src/resolvers/url_resolver.ts | 18 - packages/sol-resolver/src/types.ts | 9 - packages/sol-resolver/tsconfig.json | 8 - packages/sol-resolver/tslint.json | 3 - packages/sol-trace/CHANGELOG.json | 2 +- packages/sol-trace/CHANGELOG.md | 2 +- packages/sol-trace/package.json | 6 +- packages/sol-trace/src/index.ts | 4 +- packages/sol-trace/src/revert_trace_subprovider.ts | 2 +- packages/sol-tracing-utils/README.md | 6 +- packages/sol-tracing-utils/package.json | 8 +- .../artifact_adapters/truffle_artifact_adapter.ts | 2 +- .../src/trace_collection_subprovider.ts | 2 +- packages/sra-spec/.discharge.json | 13 - packages/sra-spec/.gitignore | 1 - packages/sra-spec/.npmignore | 8 - packages/sra-spec/CHANGELOG.json | 188 -- packages/sra-spec/CHANGELOG.md | 83 - packages/sra-spec/README.md | 93 - packages/sra-spec/build_scripts/buildJson.ts | 7 - packages/sra-spec/package.json | 63 - packages/sra-spec/public/index.html | 24 - packages/sra-spec/src/api.ts | 310 --- packages/sra-spec/src/errors.ts | 24 - packages/sra-spec/src/examples/errors.ts | 11 - packages/sra-spec/src/examples/index.ts | 21 - .../examples/relayerApiAssetDataPairsResponse.ts | 22 - .../examples/relayerApiFeeRecipientsResponse.ts | 10 - packages/sra-spec/src/examples/relayerApiOrder.ts | 20 - .../src/examples/relayerApiOrderConfigPayload.ts | 11 - .../src/examples/relayerApiOrderConfigResponse.ts | 6 - .../src/examples/relayerApiOrderbookResponse.ts | 56 - .../src/examples/relayerApiOrdersResponse.ts | 27 - packages/sra-spec/src/examples/signedOrder.ts | 17 - packages/sra-spec/src/headers.ts | 20 - packages/sra-spec/src/index.ts | 1 - packages/sra-spec/src/json-schemas.ts | 65 - packages/sra-spec/src/md/index.ts | 5 - packages/sra-spec/src/md/introduction.md | 210 -- packages/sra-spec/src/parameters.ts | 39 - packages/sra-spec/src/responses.ts | 24 - packages/sra-spec/tsconfig.json | 8 - packages/sra-spec/tslint.json | 3 - packages/subproviders/README.md | 8 +- packages/subproviders/package.json | 4 +- packages/subproviders/src/subproviders/ganache.ts | 2 +- packages/testnet-faucets/Dockerfile | 13 - packages/testnet-faucets/README.md | 153 -- packages/testnet-faucets/gulpfile.js | 91 - packages/testnet-faucets/package.json | 50 - packages/testnet-faucets/src/ts/configs.ts | 7 - packages/testnet-faucets/src/ts/constants.ts | 5 - packages/testnet-faucets/src/ts/dispatch_queue.ts | 53 - .../testnet-faucets/src/ts/dispense_asset_tasks.ts | 73 - packages/testnet-faucets/src/ts/error_reporter.ts | 37 - packages/testnet-faucets/src/ts/global.d.ts | 6 - packages/testnet-faucets/src/ts/handler.ts | 200 -- .../src/ts/parameter_transformer.ts | 28 - packages/testnet-faucets/src/ts/rpc_urls.ts | 12 - packages/testnet-faucets/src/ts/server.ts | 52 - packages/testnet-faucets/src/ts/tokens.ts | 44 - packages/testnet-faucets/tsconfig.json | 9 - packages/testnet-faucets/tslint.json | 3 - packages/tslint-config/.npmignore | 7 - packages/tslint-config/CHANGELOG.json | 283 --- packages/tslint-config/CHANGELOG.md | 124 -- packages/tslint-config/README.md | 71 - packages/tslint-config/package.json | 52 - packages/tslint-config/rules/asyncSuffixRule.ts | 10 - packages/tslint-config/rules/booleanNamingRule.ts | 69 - .../rules/customNoMagicNumbersRule.ts | 79 - packages/tslint-config/rules/enumNamingRule.ts | 60 - .../rules/underscorePrivateAndProtectedRule.ts | 61 - .../tslint-config/rules/walkers/async_suffix.ts | 35 - packages/tslint-config/test/enumNamingSpec.spec.ts | 88 - packages/tslint-config/test/lintrunner.ts | 23 - packages/tslint-config/tsconfig.json | 8 - packages/tslint-config/tslint.json | 130 -- packages/types/.npmignore | 6 - packages/types/CHANGELOG.json | 420 ---- packages/types/CHANGELOG.md | 171 -- packages/types/README.md | 69 - packages/types/package.json | 40 - packages/types/src/globals.d.ts | 6 - packages/types/src/index.ts | 687 ------ packages/types/tsconfig.json | 8 - packages/types/tslint.json | 3 - packages/typescript-typings/package.json | 10 +- .../typescript-typings/types/@ledgerhq/index.d.ts | 45 - .../types/async-child-process/index.d.ts | 1 - .../types/chai-as-promised/index.d.ts | 266 --- .../types/chai-bignumber/index.d.ts | 1 - packages/typescript-typings/types/chai/index.d.ts | 1257 ----------- .../typescript-typings/types/dirty-chai/index.d.ts | 1 - packages/typescript-typings/types/dsolc/index.d.ts | 105 + .../types/es6-promisify/index.d.ts | 1 - .../types/ethereumjs-abi/index.d.ts | 7 - .../types/ethereumjs-util/index.d.ts | 100 - .../types/ganache-core/index.d.ts | 23 + .../types/json-rpc-error/index.d.ts | 8 - .../typescript-typings/types/keccak/index.d.ts | 1 - .../types/openapi-schema-validation/index.d.ts | 1 - .../types/promisify-child-process/index.d.ts | 1 - .../types/publish-release/index.d.ts | 1 - .../types/react-highlight/index.d.ts | 1 - .../types/react-popper/index.d.ts | 49 - .../types/react-tooltip/index.d.ts | 1 - .../types/react-typist/index.d.ts | 1 - .../types/request-promise-native/index.d.ts | 1 - .../typescript-typings/types/rollbar/index.d.ts | 1 - .../types/semver-diff/index.d.ts | 1 - .../types/semver-sort/index.d.ts | 3 - packages/typescript-typings/types/solc/index.d.ts | 105 - .../types/to-snake-case/index.d.ts | 4 - .../types/truffle-hdwalet-provider/index.d.ts | 11 - .../types/web3-eth-abi/index.d.ts | 3 - packages/typescript-typings/types/web3/index.d.ts | 231 -- packages/utils/.npmignore | 6 - packages/utils/CHANGELOG.json | 423 ---- packages/utils/CHANGELOG.md | 179 -- packages/utils/README.md | 84 - packages/utils/coverage/.gitkeep | 0 packages/utils/package.json | 64 - packages/utils/src/abi_decoder.ts | 113 - .../abi_encoder/abstract_data_types/data_type.ts | 76 - .../abi_encoder/abstract_data_types/interfaces.ts | 19 - .../abi_encoder/abstract_data_types/types/blob.ts | 40 - .../abstract_data_types/types/pointer.ts | 54 - .../abi_encoder/abstract_data_types/types/set.ts | 224 -- .../utils/src/abi_encoder/calldata/blocks/blob.ts | 20 - .../src/abi_encoder/calldata/blocks/pointer.ts | 61 - .../utils/src/abi_encoder/calldata/blocks/set.ts | 47 - .../utils/src/abi_encoder/calldata/calldata.ts | 245 --- .../src/abi_encoder/calldata/calldata_block.ts | 77 - .../utils/src/abi_encoder/calldata/iterator.ts | 114 - .../utils/src/abi_encoder/calldata/raw_calldata.ts | 82 - .../utils/src/abi_encoder/evm_data_type_factory.ts | 165 -- .../src/abi_encoder/evm_data_types/address.ts | 50 - .../utils/src/abi_encoder/evm_data_types/array.ts | 74 - .../utils/src/abi_encoder/evm_data_types/bool.ts | 53 - .../abi_encoder/evm_data_types/dynamic_bytes.ts | 72 - .../utils/src/abi_encoder/evm_data_types/int.ts | 63 - .../utils/src/abi_encoder/evm_data_types/method.ts | 85 - .../src/abi_encoder/evm_data_types/pointer.ts | 21 - .../src/abi_encoder/evm_data_types/static_bytes.ts | 78 - .../utils/src/abi_encoder/evm_data_types/string.ts | 59 - .../utils/src/abi_encoder/evm_data_types/tuple.ts | 34 - .../utils/src/abi_encoder/evm_data_types/uint.ts | 62 - packages/utils/src/abi_encoder/index.ts | 16 - packages/utils/src/abi_encoder/utils/constants.ts | 17 - packages/utils/src/abi_encoder/utils/math.ts | 113 - packages/utils/src/abi_encoder/utils/queue.ts | 39 - packages/utils/src/abi_encoder/utils/rules.ts | 8 - .../src/abi_encoder/utils/signature_parser.ts | 101 - packages/utils/src/abi_utils.ts | 229 -- packages/utils/src/address_utils.ts | 46 - packages/utils/src/class_utils.ts | 18 - packages/utils/src/configured_bignumber.ts | 37 - packages/utils/src/constants.ts | 1 - packages/utils/src/error_utils.ts | 5 - packages/utils/src/fetch_async.ts | 40 - packages/utils/src/globals.d.ts | 6 - packages/utils/src/index.ts | 13 - packages/utils/src/interval_utils.ts | 39 - packages/utils/src/log_utils.ts | 13 - packages/utils/src/promisify.ts | 19 - packages/utils/src/sign_typed_data_utils.ts | 83 - .../test/abi_encoder/abi_samples/method_abis.ts | 780 ------- .../test/abi_encoder/abi_samples/optimizer_abis.ts | 340 --- .../abi_encoder/abi_samples/return_value_abis.ts | 99 - .../utils/test/abi_encoder/evm_data_types_test.ts | 1168 ---------- packages/utils/test/abi_encoder/methods_test.ts | 385 ---- packages/utils/test/abi_encoder/optimizer_test.ts | 269 --- .../utils/test/abi_encoder/return_values_test.ts | 77 - packages/utils/test/abi_encoder/signature_tests.ts | 0 packages/utils/test/abi_utils_test.ts | 19 - packages/utils/test/sign_typed_data_utils_test.ts | 163 -- packages/utils/test/utils/chai_setup.ts | 13 - packages/utils/tsconfig.json | 8 - packages/utils/tslint.json | 3 - packages/verdaccio/Dockerfile | 3 - packages/verdaccio/README.md | 18 - packages/verdaccio/conf.yaml | 71 - packages/web3-wrapper/.npmignore | 6 - packages/web3-wrapper/CHANGELOG.json | 489 ----- packages/web3-wrapper/CHANGELOG.md | 190 -- packages/web3-wrapper/README.md | 71 - packages/web3-wrapper/coverage/.gitkeep | 0 packages/web3-wrapper/package.json | 69 - packages/web3-wrapper/src/globals.d.ts | 6 - packages/web3-wrapper/src/index.ts | 60 - packages/web3-wrapper/src/marshaller.ts | 230 -- packages/web3-wrapper/src/types.ts | 92 - packages/web3-wrapper/src/utils.ts | 54 - packages/web3-wrapper/src/web3_wrapper.ts | 703 ------ packages/web3-wrapper/test/utils/chai_setup.ts | 13 - packages/web3-wrapper/test/web3_wrapper_test.ts | 169 -- packages/web3-wrapper/tsconfig.json | 8 - packages/web3-wrapper/tslint.json | 3 - packages/web3-wrapper/typedoc-tsconfig.json | 7 - packages/website/.gitignore | 1 - packages/website/README.md | 69 - packages/website/contracts/Mintable.json | 189 -- packages/website/less/all.less | 146 -- packages/website/less/normalize.less | 349 --- packages/website/md/docs/0xjs/0.0.1/async.md | 26 - packages/website/md/docs/0xjs/0.0.1/errors.md | 1 - .../website/md/docs/0xjs/0.0.1/installation.md | 31 - .../website/md/docs/0xjs/0.0.1/introduction.md | 1 - packages/website/md/docs/0xjs/0.0.1/versioning.md | 1 - packages/website/md/docs/0xjs/1.0.1/async.md | 31 - .../website/md/docs/0xjs/1.0.1/installation.md | 40 - .../website/md/docs/0xjs/1.0.1/introduction.md | 1 - packages/website/md/docs/0xjs/1.0.1/versioning.md | 1 - packages/website/md/docs/0xjs/2.0.0/async.md | 26 - .../website/md/docs/0xjs/2.0.0/installation.md | 38 - .../website/md/docs/asset_buyer/installation.md | 17 - .../website/md/docs/asset_buyer/introduction.md | 1 - packages/website/md/docs/asset_buyer/usage.md | 39 - packages/website/md/docs/connect/1/installation.md | 15 - packages/website/md/docs/connect/1/introduction.md | 1 - packages/website/md/docs/connect/2/introduction.md | 1 - packages/website/md/docs/connect/3/installation.md | 15 - .../md/docs/contract_wrappers/1/installation.md | 11 - .../md/docs/contract_wrappers/1/introduction.md | 1 - .../md/docs/contract_wrappers/2/installation.md | 11 - .../website/md/docs/ethereum_types/installation.md | 11 - .../website/md/docs/ethereum_types/introduction.md | 1 - .../website/md/docs/json_schemas/1/installation.md | 17 - .../website/md/docs/json_schemas/1/introduction.md | 3 - packages/website/md/docs/json_schemas/1/schemas.md | 28 - packages/website/md/docs/json_schemas/1/usage.md | 14 - packages/website/md/docs/json_schemas/2/schemas.md | 40 - .../website/md/docs/json_schemas/3/installation.md | 17 - .../website/md/docs/json_schemas/3/introduction.md | 3 - packages/website/md/docs/json_schemas/3/schemas.md | 41 - packages/website/md/docs/json_schemas/3/usage.md | 14 - .../website/md/docs/migrations/1/installation.md | 17 - .../website/md/docs/migrations/1/introduction.md | 1 - .../website/md/docs/order_utils/1/installation.md | 17 - .../website/md/docs/order_utils/1/introduction.md | 1 - .../website/md/docs/order_utils/2/installation.md | 17 - .../website/md/docs/order_utils/2/introduction.md | 1 - .../md/docs/order_watcher/1/installation.md | 17 - .../md/docs/order_watcher/1/introduction.md | 1 - .../md/docs/order_watcher/2/installation.md | 17 - .../md/docs/order_watcher/2/introduction.md | 1 - .../md/docs/smart_contracts/1/introduction.md | 1 - .../md/docs/smart_contracts/2/introduction.md | 6 - .../website/md/docs/sol-compiler/1/installation.md | 23 - .../website/md/docs/sol-compiler/1/introduction.md | 8 - packages/website/md/docs/sol-compiler/1/usage.md | 24 - .../website/md/docs/sol-compiler/2/installation.md | 23 - packages/website/md/docs/sol-compiler/2/usage.md | 24 - .../website/md/docs/sol_coverage/installation.md | 17 - .../website/md/docs/sol_coverage/introduction.md | 1 - packages/website/md/docs/sol_coverage/usage.md | 74 - .../website/md/docs/sol_profiler/installation.md | 17 - .../website/md/docs/sol_profiler/introduction.md | 1 - packages/website/md/docs/sol_profiler/usage.md | 74 - packages/website/md/docs/sol_trace/installation.md | 17 - packages/website/md/docs/sol_trace/introduction.md | 1 - packages/website/md/docs/sol_trace/usage.md | 62 - .../website/md/docs/subproviders/1/installation.md | 15 - .../website/md/docs/subproviders/1/introduction.md | 1 - .../md/docs/subproviders/1/ledger_node_hid.md | 17 - .../website/md/docs/subproviders/2/installation.md | 15 - .../website/md/docs/web3_wrapper/1/installation.md | 25 - .../website/md/docs/web3_wrapper/1/introduction.md | 1 - .../website/md/docs/web3_wrapper/2/installation.md | 25 - packages/website/package.json | 128 -- packages/website/public/css/basscss.min.css | 1 - .../public/css/basscss_responsive_custom.css | 106 - .../public/css/basscss_responsive_margin.css | 453 ---- .../public/css/basscss_responsive_padding.css | 134 -- .../public/css/basscss_responsive_type_scale.css | 35 - packages/website/public/css/formular.css | 45 - packages/website/public/css/github-gist.css | 71 - .../public/css/material-design-iconic-font.min.css | 1 - packages/website/public/css/roboto.css | 89 - packages/website/public/css/roboto_mono.css | 69 - packages/website/public/fonts/Formular-Light.woff | Bin 44630 -> 0 bytes packages/website/public/fonts/Formular-Light.woff2 | Bin 34337 -> 0 bytes .../website/public/fonts/Formular-Regular.woff | Bin 45102 -> 0 bytes .../website/public/fonts/Formular-Regular.woff2 | Bin 34607 -> 0 bytes .../public/fonts/Material-Design-Iconic-Font.eot | Bin 42495 -> 0 bytes .../public/fonts/Material-Design-Iconic-Font.svg | 787 ------- .../public/fonts/Material-Design-Iconic-Font.ttf | Bin 99212 -> 0 bytes .../public/fonts/Material-Design-Iconic-Font.woff | Bin 50312 -> 0 bytes .../public/fonts/Material-Design-Iconic-Font.woff2 | Bin 38384 -> 0 bytes packages/website/public/fonts/Roboto-Black.ttf | Bin 171480 -> 0 bytes .../website/public/fonts/Roboto-BlackItalic.ttf | Bin 177552 -> 0 bytes packages/website/public/fonts/Roboto-Bold.ttf | Bin 170760 -> 0 bytes .../website/public/fonts/Roboto-BoldItalic.ttf | Bin 174952 -> 0 bytes packages/website/public/fonts/Roboto-Italic.ttf | Bin 173932 -> 0 bytes packages/website/public/fonts/Roboto-Light.ttf | Bin 170420 -> 0 bytes .../website/public/fonts/Roboto-LightItalic.ttf | Bin 176616 -> 0 bytes packages/website/public/fonts/Roboto-Medium.ttf | Bin 172064 -> 0 bytes .../website/public/fonts/Roboto-MediumItalic.ttf | Bin 176864 -> 0 bytes packages/website/public/fonts/Roboto-Regular.ttf | Bin 171676 -> 0 bytes packages/website/public/fonts/Roboto-Thin.ttf | Bin 171904 -> 0 bytes .../website/public/fonts/Roboto-ThinItalic.ttf | Bin 176300 -> 0 bytes packages/website/public/fonts/RobotoMono-Bold.ttf | Bin 114752 -> 0 bytes .../website/public/fonts/RobotoMono-BoldItalic.ttf | Bin 122808 -> 0 bytes .../website/public/fonts/RobotoMono-Italic.ttf | Bin 120832 -> 0 bytes packages/website/public/fonts/RobotoMono-Light.ttf | Bin 118976 -> 0 bytes .../public/fonts/RobotoMono-LightItalic.ttf | Bin 127568 -> 0 bytes .../website/public/fonts/RobotoMono-Medium.ttf | Bin 114696 -> 0 bytes .../public/fonts/RobotoMono-MediumItalic.ttf | Bin 123640 -> 0 bytes .../website/public/fonts/RobotoMono-Regular.ttf | Bin 114624 -> 0 bytes packages/website/public/fonts/RobotoMono-Thin.ttf | Bin 118132 -> 0 bytes .../website/public/fonts/RobotoMono-ThinItalic.ttf | Bin 121456 -> 0 bytes packages/website/public/gifs/genesis.gif | Bin 735849 -> 0 bytes .../images/0x-instant/0x-instant-widgets.png | Bin 64041 -> 0 bytes .../images/0x-instant/0x-instant-widgets@2x.png | Bin 190593 -> 0 bytes .../website/public/images/0x-instant/widget-1.png | Bin 27160 -> 0 bytes .../website/public/images/0x-instant/widget-2.png | Bin 47878 -> 0 bytes .../website/public/images/0x-instant/widget-3.png | Bin 27505 -> 0 bytes .../website/public/images/0x-instant/widget-4.png | Bin 30727 -> 0 bytes .../website/public/images/0x-instant/widget-5.png | Bin 144454 -> 0 bytes .../website/public/images/0x-instant/widget-6.png | Bin 28382 -> 0 bytes packages/website/public/images/0x_logo.png | Bin 64503 -> 0 bytes .../website/public/images/about/about-office.png | Bin 474673 -> 0 bytes .../website/public/images/banner/bottomofcta.png | Bin 15803 -> 0 bytes packages/website/public/images/banner/topofcta.png | Bin 13342 -> 0 bytes packages/website/public/images/clients/bamboo.svg | 17 - packages/website/public/images/clients/emoon.svg | 8 - packages/website/public/images/clients/ercdex.svg | 16 - .../public/images/clients/godsUnchained.svg | 16 - packages/website/public/images/clients/instex.svg | 40 - .../website/public/images/clients/laketrade.svg | 13 - .../website/public/images/clients/ledgerdex.svg | 19 - .../website/public/images/clients/openrelay.svg | 22 - packages/website/public/images/clients/paradex.svg | 9 - .../website/public/images/clients/radar-relay.svg | 13 - .../website/public/images/clients/sharkrelay.svg | 32 - .../website/public/images/clients/starbitex.svg | 22 - .../website/public/images/clients/tokenjar.svg | 13 - packages/website/public/images/clients/veil.svg | 4 - .../website/public/images/coinbase_wallet_logo.png | Bin 103648 -> 0 bytes .../website/public/images/developers/logo/0x.svg | 24 - .../website/public/images/developers/logo/docs.svg | 6 - .../developers/tutorials/0x_order_basics.svg | 1 - .../developers/tutorials/build_a_relayer.svg | 3 - .../developers/tutorials/build_a_trading_bot.svg | 6 - .../developers/tutorials/develop_on_ethereum.svg | 4 - .../developers/tutorials/integrate_0x_instant.svg | 3 - .../developers/tutorials/use_shared_liquidity.svg | 3 - .../website/public/images/doc_icons/connect.png | Bin 289 -> 0 bytes .../website/public/images/doc_icons/contracts.png | Bin 930 -> 0 bytes packages/website/public/images/doc_icons/docs.png | Bin 578 -> 0 bytes packages/website/public/images/doc_icons/wiki.png | Bin 760 -> 0 bytes .../website/public/images/doc_icons/zeroExJs.png | Bin 1209 -> 0 bytes packages/website/public/images/eth_dollar.svg | 29 - packages/website/public/images/eth_token.svg | 20 - packages/website/public/images/eth_token_erc20.svg | 22 - packages/website/public/images/ether.png | Bin 4235 -> 0 bytes packages/website/public/images/ether_alt.svg | 7 - packages/website/public/images/events/berlin.jpg | Bin 108690 -> 0 bytes .../website/public/images/events/event-sample.jpg | Bin 24594 -> 0 bytes packages/website/public/images/events/london.jpg | Bin 138979 -> 0 bytes packages/website/public/images/events/sf.jpg | Bin 108324 -> 0 bytes .../public/images/favicon/favicon-2-16x16.png | Bin 684 -> 0 bytes .../public/images/favicon/favicon-2-32x32.png | Bin 1567 -> 0 bytes packages/website/public/images/favicon/favicon.ico | Bin 5430 -> 0 bytes packages/website/public/images/jobs/map@2x.png | Bin 27904 -> 0 bytes .../website/public/images/landing/0x_chips.png | Bin 170875 -> 0 bytes .../website/public/images/landing/0x_homepage.svg | 341 --- packages/website/public/images/landing/aragon.png | Bin 4738 -> 0 bytes packages/website/public/images/landing/augur.png | Bin 4935 -> 0 bytes .../website/public/images/landing/currency.png | Bin 3348 -> 0 bytes packages/website/public/images/landing/dharma.png | Bin 4754 -> 0 bytes .../public/images/landing/digital_goods.png | Bin 3880 -> 0 bytes .../public/images/landing/distributed_network.png | Bin 37483 -> 0 bytes .../website/public/images/landing/ethfinex.png | Bin 6733 -> 0 bytes .../public/images/landing/exchange_everywhere.png | Bin 7084 -> 0 bytes .../public/images/landing/fund_management_icon.png | Bin 5552 -> 0 bytes packages/website/public/images/landing/gnosis.png | Bin 4888 -> 0 bytes .../public/images/landing/governance_icon.png | Bin 6230 -> 0 bytes .../public/images/landing/hero_chip_image.png | Bin 256493 -> 0 bytes .../website/public/images/landing/lendroid.png | Bin 4305 -> 0 bytes .../website/public/images/landing/liquidity.png | Bin 22140 -> 0 bytes .../website/public/images/landing/loans_icon.png | Bin 5900 -> 0 bytes packages/website/public/images/landing/maker.png | Bin 3501 -> 0 bytes .../website/public/images/landing/melonport.png | Bin 4841 -> 0 bytes .../website/public/images/landing/open_source.png | Bin 14696 -> 0 bytes packages/website/public/images/landing/paradex.png | Bin 6904 -> 0 bytes .../images/landing/prediction_market_icon.png | Bin 6211 -> 0 bytes .../images/landing/project_logos/amadeus.png | Bin 6156 -> 0 bytes .../public/images/landing/project_logos/anx.png | Bin 5836 -> 0 bytes .../public/images/landing/project_logos/aragon.png | Bin 4642 -> 0 bytes .../public/images/landing/project_logos/auctus.png | Bin 3751 -> 0 bytes .../public/images/landing/project_logos/augur.png | Bin 4618 -> 0 bytes .../images/landing/project_logos/blocknet.png | Bin 4697 -> 0 bytes .../images/landing/project_logos/chronobank.png | Bin 6209 -> 0 bytes .../public/images/landing/project_logos/ddex.png | Bin 5504 -> 0 bytes .../images/landing/project_logos/decent_ex.png | Bin 5100 -> 0 bytes .../images/landing/project_logos/dextroid.png | Bin 5609 -> 0 bytes .../public/images/landing/project_logos/dharma.png | Bin 5429 -> 0 bytes .../images/landing/project_logos/district0x.png | Bin 5515 -> 0 bytes .../public/images/landing/project_logos/dydx.png | Bin 4191 -> 0 bytes .../public/images/landing/project_logos/ercdex.png | Bin 3929 -> 0 bytes .../images/landing/project_logos/ethfinex.png | Bin 5486 -> 0 bytes .../public/images/landing/project_logos/ethix.png | Bin 3438 -> 0 bytes .../public/images/landing/project_logos/idt.png | Bin 3154 -> 0 bytes .../images/landing/project_logos/imToken.png | Bin 4933 -> 0 bytes .../images/landing/project_logos/lendroid.png | Bin 4866 -> 0 bytes .../public/images/landing/project_logos/maker.png | Bin 3951 -> 0 bytes .../images/landing/project_logos/melonport.png | Bin 5186 -> 0 bytes .../images/landing/project_logos/open_relay.png | Bin 6149 -> 0 bytes .../images/landing/project_logos/paradex.png | Bin 5725 -> 0 bytes .../images/landing/project_logos/radar_relay.png | Bin 5748 -> 0 bytes .../public/images/landing/project_logos/status.png | Bin 4287 -> 0 bytes .../images/landing/project_logos/the_ocean.png | Bin 6322 -> 0 bytes .../website/public/images/landing/radar_relay.png | Bin 6650 -> 0 bytes .../public/images/landing/relayer_diagram.png | Bin 111870 -> 0 bytes .../public/images/landing/stable_tokens_icon.png | Bin 5853 -> 0 bytes packages/website/public/images/landing/stocks.png | Bin 2098 -> 0 bytes .../public/images/landing/tokenized_world.png | Bin 109220 -> 0 bytes .../public/images/launch_kit/0x_cupboard.svg | 53 - .../public/images/launch_kit/enable_trading.svg | 9 - packages/website/public/images/launch_kit/fork.svg | 4 - .../images/launch_kit/in_game_marketplace.svg | 15 - .../public/images/launch_kit/local_market.svg | 12 - .../public/images/launch_kit/secondary_market.svg | 6 - .../public/images/launch_kit/shared_liquidity.svg | 20 - packages/website/public/images/ledger_icon.png | Bin 4885 -> 0 bytes packages/website/public/images/lock_icon.svg | 3 - packages/website/public/images/logos/FBG.png | Bin 73781 -> 0 bytes packages/website/public/images/logos/aragon.png | Bin 5501 -> 0 bytes packages/website/public/images/logos/augur.png | Bin 5051 -> 0 bytes .../public/images/logos/blockchain_capital.png | Bin 12366 -> 0 bytes .../website/public/images/logos/chronobank.png | Bin 5615 -> 0 bytes packages/website/public/images/logos/dharma.png | Bin 5015 -> 0 bytes .../website/public/images/logos/district0x.png | Bin 5537 -> 0 bytes .../website/public/images/logos/jen_advisors.png | Bin 158434 -> 0 bytes packages/website/public/images/logos/maker.png | Bin 3791 -> 0 bytes packages/website/public/images/logos/melonport.png | Bin 5218 -> 0 bytes packages/website/public/images/logos/openANX.png | Bin 4973 -> 0 bytes .../public/images/logos/pantera_capital.png | Bin 8437 -> 0 bytes .../public/images/logos/polychain_capital.png | Bin 21279 -> 0 bytes packages/website/public/images/metamask_icon.png | Bin 5728 -> 0 bytes .../website/public/images/metamask_or_parity.png | Bin 22907 -> 0 bytes .../website/public/images/network_icons/kovan.png | Bin 244 -> 0 bytes .../public/images/network_icons/mainnet.png | Bin 205 -> 0 bytes .../public/images/network_icons/rinkeby.png | Bin 126 -> 0 bytes .../public/images/network_icons/ropsten.png | Bin 251 -> 0 bytes packages/website/public/images/og_image.png | Bin 51927 -> 0 bytes .../website/public/images/press/logo-forbes.png | Bin 2420 -> 0 bytes .../website/public/images/press/logo-fortune.png | Bin 1800 -> 0 bytes .../public/images/press/logo-techcrunch.png | Bin 2332 -> 0 bytes .../public/images/press/logo-venturebeat.png | Bin 2660 -> 0 bytes .../website/public/images/protocol_logo_black.png | Bin 4031 -> 0 bytes .../website/public/images/protocol_logo_white.png | Bin 3931 -> 0 bytes .../website/public/images/relayer-logos/logo.png | Bin 6758 -> 0 bytes .../website/public/images/relayer-logos/logo_1.png | Bin 7951 -> 0 bytes .../public/images/relayer-logos/logo_2.1.png | Bin 4942 -> 0 bytes .../public/images/relayer-logos/logo_2.2.png | Bin 5115 -> 0 bytes .../public/images/relayer-logos/logo_2.3.png | Bin 8685 -> 0 bytes .../website/public/images/relayer-logos/logo_2.png | Bin 6479 -> 0 bytes .../website/public/images/relayer-logos/logo_3.png | Bin 7888 -> 0 bytes .../website/public/images/relayer-logos/logo_4.png | Bin 9083 -> 0 bytes .../website/public/images/relayer-logos/logo_5.png | Bin 5768 -> 0 bytes .../website/public/images/relayer_fallback.png | Bin 4707 -> 0 bytes .../website/public/images/setup_account_icon.svg | 3 - packages/website/public/images/social/discord.png | Bin 858 -> 0 bytes .../website/public/images/social/discourse.png | Bin 1454 -> 0 bytes packages/website/public/images/social/github.png | Bin 1154 -> 0 bytes packages/website/public/images/social/medium.png | Bin 890 -> 0 bytes packages/website/public/images/social/reddit.png | Bin 1168 -> 0 bytes packages/website/public/images/social/slack.png | Bin 1311 -> 0 bytes packages/website/public/images/social/twitter.png | Bin 901 -> 0 bytes .../website/public/images/team/advisors/davids.jpg | Bin 25263 -> 0 bytes .../website/public/images/team/advisors/frede.jpg | Bin 17015 -> 0 bytes .../website/public/images/team/advisors/joeyk.jpg | Bin 23496 -> 0 bytes .../website/public/images/team/advisors/lindax.jpg | Bin 20576 -> 0 bytes .../website/public/images/team/advisors/olafc.jpg | Bin 18024 -> 0 bytes packages/website/public/images/team/alexb.jpg | Bin 17441 -> 0 bytes packages/website/public/images/team/alexv.jpg | Bin 16969 -> 0 bytes packages/website/public/images/team/amirb.jpg | Bin 21075 -> 0 bytes packages/website/public/images/team/benb.jpg | Bin 17571 -> 0 bytes packages/website/public/images/team/blake.jpg | Bin 17515 -> 0 bytes packages/website/public/images/team/brandonm.jpg | Bin 18765 -> 0 bytes packages/website/public/images/team/chrisk.jpg | Bin 16316 -> 0 bytes packages/website/public/images/team/clayr.jpg | Bin 17222 -> 0 bytes packages/website/public/images/team/eugenea.jpg | Bin 23527 -> 0 bytes packages/website/public/images/team/fabiob.jpg | Bin 15358 -> 0 bytes packages/website/public/images/team/francesco.jpg | Bin 17467 -> 0 bytes packages/website/public/images/team/greg.jpg | Bin 21163 -> 0 bytes packages/website/public/images/team/jacobe.jpg | Bin 28977 -> 0 bytes packages/website/public/images/team/jasons.jpg | Bin 20455 -> 0 bytes packages/website/public/images/team/leonidL.jpg | Bin 14413 -> 0 bytes packages/website/public/images/team/mattt.jpg | Bin 18348 -> 0 bytes packages/website/public/images/team/melo.jpg | Bin 19188 -> 0 bytes packages/website/public/images/team/oshirob.png | Bin 522249 -> 0 bytes packages/website/public/images/team/peterz.jpg | Bin 30404 -> 0 bytes packages/website/public/images/team/rahuls.jpg | Bin 21412 -> 0 bytes packages/website/public/images/team/remcoB.jpg | Bin 24435 -> 0 bytes packages/website/public/images/team/steveK.jpg | Bin 39082 -> 0 bytes packages/website/public/images/team/toms.jpg | Bin 13682 -> 0 bytes packages/website/public/images/team/weijew.jpg | Bin 22031 -> 0 bytes packages/website/public/images/team/willw.jpg | Bin 25440 -> 0 bytes packages/website/public/images/team/xianny.jpg | Bin 29992 -> 0 bytes packages/website/public/images/team/zack.jpg | Bin 19292 -> 0 bytes packages/website/public/images/token_icons/1ST.png | Bin 7872 -> 0 bytes .../website/public/images/token_icons/ABYSS.png | Bin 13633 -> 0 bytes packages/website/public/images/token_icons/ADT.png | Bin 10747 -> 0 bytes packages/website/public/images/token_icons/AE.png | Bin 12322 -> 0 bytes .../website/public/images/token_icons/AION.png | Bin 2777 -> 0 bytes packages/website/public/images/token_icons/AIR.png | Bin 20802 -> 0 bytes packages/website/public/images/token_icons/ANT.png | Bin 42477 -> 0 bytes .../website/public/images/token_icons/APCC.png | Bin 19592 -> 0 bytes .../website/public/images/token_icons/APPC.png | Bin 19592 -> 0 bytes packages/website/public/images/token_icons/ARN.png | Bin 16200 -> 0 bytes packages/website/public/images/token_icons/ART.png | Bin 12430 -> 0 bytes packages/website/public/images/token_icons/AST.png | Bin 14169 -> 0 bytes packages/website/public/images/token_icons/BAT.png | Bin 6188 -> 0 bytes .../website/public/images/token_icons/BCAP.png | Bin 7787 -> 0 bytes .../website/public/images/token_icons/BCPT.png | Bin 10283 -> 0 bytes packages/website/public/images/token_icons/BNT.png | Bin 4011 -> 0 bytes packages/website/public/images/token_icons/BRM.png | Bin 18794 -> 0 bytes packages/website/public/images/token_icons/CAG.png | Bin 11062 -> 0 bytes packages/website/public/images/token_icons/CAN.png | Bin 10234 -> 0 bytes packages/website/public/images/token_icons/CAT.png | Bin 23361 -> 0 bytes packages/website/public/images/token_icons/CFI.png | Bin 11105 -> 0 bytes packages/website/public/images/token_icons/CVC.png | Bin 10700 -> 0 bytes packages/website/public/images/token_icons/DAI.png | Bin 6926 -> 0 bytes .../website/public/images/token_icons/DATA.png | Bin 13313 -> 0 bytes packages/website/public/images/token_icons/DEB.png | Bin 13991 -> 0 bytes packages/website/public/images/token_icons/DGD.png | Bin 23282 -> 0 bytes .../website/public/images/token_icons/DIVX.png | Bin 5110 -> 0 bytes packages/website/public/images/token_icons/DNT.png | Bin 10054 -> 0 bytes packages/website/public/images/token_icons/EDG.png | Bin 2712 -> 0 bytes packages/website/public/images/token_icons/EDU.png | Bin 13535 -> 0 bytes .../website/public/images/token_icons/ELEC.png | Bin 11379 -> 0 bytes .../website/public/images/token_icons/EMONT.png | Bin 10523 -> 0 bytes packages/website/public/images/token_icons/ENG.png | Bin 6767 -> 0 bytes .../website/public/images/token_icons/ENTR.png | Bin 3951 -> 0 bytes packages/website/public/images/token_icons/EOS.png | Bin 6979 -> 0 bytes packages/website/public/images/token_icons/EVE.png | Bin 5895 -> 0 bytes packages/website/public/images/token_icons/FUN.png | Bin 14973 -> 0 bytes packages/website/public/images/token_icons/GEE.png | Bin 10235 -> 0 bytes packages/website/public/images/token_icons/GEN.png | Bin 5280 -> 0 bytes packages/website/public/images/token_icons/GET.png | Bin 11930 -> 0 bytes packages/website/public/images/token_icons/GNO.png | Bin 16559 -> 0 bytes packages/website/public/images/token_icons/GNT.png | Bin 2990 -> 0 bytes packages/website/public/images/token_icons/HGT.png | Bin 5709 -> 0 bytes packages/website/public/images/token_icons/HOT.png | Bin 4578 -> 0 bytes packages/website/public/images/token_icons/ICN.png | Bin 3962 -> 0 bytes packages/website/public/images/token_icons/IND.png | Bin 4583 -> 0 bytes packages/website/public/images/token_icons/J8T.png | Bin 10835 -> 0 bytes packages/website/public/images/token_icons/JET.png | Bin 18374 -> 0 bytes packages/website/public/images/token_icons/KIN.png | Bin 6075 -> 0 bytes packages/website/public/images/token_icons/KNC.png | Bin 8396 -> 0 bytes .../website/public/images/token_icons/LINK.png | Bin 11267 -> 0 bytes .../website/public/images/token_icons/LOOM.png | Bin 9491 -> 0 bytes packages/website/public/images/token_icons/LUN.png | Bin 13648 -> 0 bytes .../website/public/images/token_icons/MANA.png | Bin 17411 -> 0 bytes packages/website/public/images/token_icons/MCO.png | Bin 6487 -> 0 bytes packages/website/public/images/token_icons/MKR.png | Bin 6967 -> 0 bytes packages/website/public/images/token_icons/MLN.png | Bin 3408 -> 0 bytes packages/website/public/images/token_icons/MOD.png | Bin 7088 -> 0 bytes .../website/public/images/token_icons/MORPH.png | Bin 8919 -> 0 bytes packages/website/public/images/token_icons/MOT.png | Bin 6069 -> 0 bytes packages/website/public/images/token_icons/MTL.png | Bin 3540 -> 0 bytes .../website/public/images/token_icons/NANJ.png | Bin 11577 -> 0 bytes .../website/public/images/token_icons/NAVI.png | Bin 6827 -> 0 bytes packages/website/public/images/token_icons/NCT.png | Bin 5462 -> 0 bytes packages/website/public/images/token_icons/NDC.png | Bin 20972 -> 0 bytes .../website/public/images/token_icons/NEXO.png | Bin 4689 -> 0 bytes packages/website/public/images/token_icons/NMR.png | Bin 21822 -> 0 bytes packages/website/public/images/token_icons/OAX.png | Bin 6331 -> 0 bytes packages/website/public/images/token_icons/OCC.png | Bin 7774 -> 0 bytes packages/website/public/images/token_icons/OMG.png | Bin 5311 -> 0 bytes packages/website/public/images/token_icons/OMX.png | Bin 7320 -> 0 bytes packages/website/public/images/token_icons/PAL.png | Bin 13196 -> 0 bytes packages/website/public/images/token_icons/PAY.png | Bin 7276 -> 0 bytes packages/website/public/images/token_icons/PKT.png | Bin 5900 -> 0 bytes .../website/public/images/token_icons/PLAY.png | Bin 3226 -> 0 bytes packages/website/public/images/token_icons/PLU.png | Bin 51829 -> 0 bytes .../website/public/images/token_icons/POLY.png | Bin 9350 -> 0 bytes .../website/public/images/token_icons/QTUM.png | Bin 32496 -> 0 bytes packages/website/public/images/token_icons/REN.png | Bin 17682 -> 0 bytes packages/website/public/images/token_icons/REP.png | Bin 13905 -> 0 bytes packages/website/public/images/token_icons/REQ.png | Bin 4476 -> 0 bytes packages/website/public/images/token_icons/RFR.png | Bin 8319 -> 0 bytes packages/website/public/images/token_icons/RLC.png | Bin 9856 -> 0 bytes packages/website/public/images/token_icons/ROL.png | Bin 16279 -> 0 bytes packages/website/public/images/token_icons/RVT.png | Bin 9294 -> 0 bytes .../website/public/images/token_icons/SALT.png | Bin 5912 -> 0 bytes packages/website/public/images/token_icons/SAN.png | Bin 7569 -> 0 bytes packages/website/public/images/token_icons/SIG.png | Bin 9885 -> 0 bytes .../website/public/images/token_icons/SNGLS.png | Bin 8475 -> 0 bytes packages/website/public/images/token_icons/SNT.png | Bin 6530 -> 0 bytes .../website/public/images/token_icons/SPANK.png | Bin 16743 -> 0 bytes packages/website/public/images/token_icons/SPN.png | Bin 4760 -> 0 bytes packages/website/public/images/token_icons/SS.png | Bin 2576 -> 0 bytes .../website/public/images/token_icons/STORJ.png | Bin 8117 -> 0 bytes packages/website/public/images/token_icons/SUB.png | Bin 15424 -> 0 bytes packages/website/public/images/token_icons/SWT.png | Bin 1215 -> 0 bytes .../website/public/images/token_icons/SXDT.png | Bin 4323 -> 0 bytes .../website/public/images/token_icons/TAAS.png | Bin 14580 -> 0 bytes .../website/public/images/token_icons/TIME.png | Bin 33752 -> 0 bytes packages/website/public/images/token_icons/TKN.png | Bin 3743 -> 0 bytes packages/website/public/images/token_icons/TRL.png | Bin 447936 -> 0 bytes .../website/public/images/token_icons/TRST.png | Bin 26306 -> 0 bytes packages/website/public/images/token_icons/TRX.png | Bin 7941 -> 0 bytes packages/website/public/images/token_icons/UPP.png | Bin 7700 -> 0 bytes packages/website/public/images/token_icons/VSL.png | Bin 17717 -> 0 bytes .../website/public/images/token_icons/WAND.png | Bin 9201 -> 0 bytes .../website/public/images/token_icons/WETH.png | Bin 7584 -> 0 bytes .../website/public/images/token_icons/WINGS.png | Bin 3822 -> 0 bytes packages/website/public/images/token_icons/WTC.png | Bin 8234 -> 0 bytes packages/website/public/images/token_icons/WYV.png | Bin 9261 -> 0 bytes .../website/public/images/token_icons/XAUR.png | Bin 5150 -> 0 bytes packages/website/public/images/token_icons/XNK.png | Bin 4117 -> 0 bytes packages/website/public/images/token_icons/XSC.png | Bin 17956 -> 0 bytes packages/website/public/images/token_icons/XYO.png | Bin 13793 -> 0 bytes packages/website/public/images/token_icons/ZIL.png | Bin 4444 -> 0 bytes packages/website/public/images/token_icons/ZRX.png | Bin 17905 -> 0 bytes packages/website/public/images/toshi_logo.jpg | Bin 4611 -> 0 bytes packages/website/public/images/trade_arrows.png | Bin 1740 -> 0 bytes packages/website/public/images/unlock-mm.png | Bin 21137 -> 0 bytes .../website/public/images/wrapped_eth_gray.png | Bin 7649 -> 0 bytes packages/website/public/images/zrx_ecosystem.svg | 158 -- packages/website/public/images/zrx_pie_chart.png | Bin 54185 -> 0 bytes packages/website/public/images/zrx_token.png | Bin 16534 -> 0 bytes packages/website/public/index.html | 134 -- packages/website/public/js/rollbar.umd.min.js | 2 - packages/website/public/pdfs/0x_white_paper.pdf | Bin 319570 -> 0 bytes packages/website/translations/chinese.json | 102 - packages/website/translations/english.json | 112 - packages/website/translations/korean.json | 102 - packages/website/translations/russian.json | 102 - packages/website/translations/spanish.json | 102 - packages/website/ts/blockchain.ts | 953 -------- packages/website/ts/blockchain_watcher.ts | 86 - packages/website/ts/components/aboutPageLayout.tsx | 70 - .../website/ts/components/animatedChatIcon.tsx | 103 - .../website/ts/components/animatedCompassIcon.tsx | 53 - packages/website/ts/components/banner.tsx | 144 -- packages/website/ts/components/blockIconLink.tsx | 84 - packages/website/ts/components/button.tsx | 104 - packages/website/ts/components/chapter_link.tsx | 15 - packages/website/ts/components/definition.tsx | 139 -- .../components/dialogs/blockchain_err_dialog.tsx | 166 -- .../dialogs/eth_weth_conversion_dialog.tsx | 194 -- .../ts/components/dialogs/ledger_config_dialog.tsx | 307 --- .../dialogs/portal_disclaimer_dialog.tsx | 36 - .../website/ts/components/dialogs/send_dialog.tsx | 137 -- .../dialogs/track_token_confirmation_dialog.tsx | 93 - .../ts/components/documentation/docs_logo.tsx | 37 - .../ts/components/documentation/docs_top_bar.tsx | 108 - .../components/documentation/overview_content.tsx | 134 -- .../ts/components/documentation/sidebar_header.tsx | 60 - .../components/documentation/tutorial_button.tsx | 59 - .../components/documentation/version_drop_down.tsx | 80 - .../components/dropdowns/developers_drop_down.tsx | 162 -- .../components/dropdowns/dropdown_developers.tsx | 184 -- .../ts/components/dropdowns/dropdown_products.tsx | 48 - .../ts/components/dropdowns/network_drop_down.tsx | 40 - .../ts/components/eth_weth_conversion_button.tsx | 128 -- packages/website/ts/components/eth_wrappers.tsx | 448 ---- packages/website/ts/components/fill_order.tsx | 661 ------ packages/website/ts/components/fill_order_json.tsx | 73 - .../website/ts/components/fill_warning_dialog.tsx | 46 - .../flash_messages/asset_send_completed.tsx | 34 - .../flash_messages/transaction_submitted.tsx | 26 - packages/website/ts/components/footer.tsx | 168 -- .../ts/components/generate_order/asset_picker.tsx | 284 --- .../generate_order/generate_order_form.tsx | 385 ---- .../components/generate_order/new_token_form.tsx | 229 -- packages/website/ts/components/hamburger.tsx | 68 - packages/website/ts/components/header.tsx | 249 --- packages/website/ts/components/hero.tsx | 143 -- packages/website/ts/components/heroAnimation.tsx | 123 -- packages/website/ts/components/heroImage.tsx | 27 - packages/website/ts/components/icon.tsx | 66 - packages/website/ts/components/image.tsx | 17 - .../website/ts/components/inputs/address_input.tsx | 71 - .../components/inputs/allowance_state_toggle.tsx | 160 -- .../ts/components/inputs/balance_bounded_input.tsx | 139 -- .../ts/components/inputs/eth_amount_input.tsx | 65 - .../ts/components/inputs/expiration_input.tsx | 100 - .../website/ts/components/inputs/hash_input.tsx | 68 - .../components/inputs/identicon_address_input.tsx | 52 - .../ts/components/inputs/token_amount_input.tsx | 152 -- .../website/ts/components/inputs/token_input.tsx | 103 - packages/website/ts/components/link.tsx | 61 - packages/website/ts/components/logo.tsx | 38 - packages/website/ts/components/meta_tags.tsx | 25 - packages/website/ts/components/mobileNav.tsx | 112 - packages/website/ts/components/modals/input.tsx | 92 - .../website/ts/components/modals/modal_contact.tsx | 390 ---- .../website/ts/components/nested_sidebar_menu.tsx | 101 - packages/website/ts/components/newLayout.tsx | 134 -- packages/website/ts/components/newsletter_form.tsx | 191 -- packages/website/ts/components/old_footer.tsx | 228 -- .../onboarding/add_eth_onboarding_step.tsx | 40 - .../onboarding/congrats_onboarding_step.tsx | 15 - .../onboarding/install_wallet_onboarding_step.tsx | 42 - .../onboarding/intro_onboarding_step.tsx | 30 - .../ts/components/onboarding/onboarding_card.tsx | 115 - .../ts/components/onboarding/onboarding_flow.tsx | 182 -- .../components/onboarding/onboarding_tooltip.tsx | 30 - .../onboarding/portal_onboarding_flow.tsx | 281 --- .../onboarding/set_allowances_onboarding_step.tsx | 30 - .../onboarding/unlock_wallet_onboarding_step.tsx | 8 - .../onboarding/wrap_eth_onboarding_step.tsx | 88 - packages/website/ts/components/order_json.tsx | 179 -- .../website/ts/components/portal/back_button.tsx | 40 - .../website/ts/components/portal/drawer_menu.tsx | 77 - packages/website/ts/components/portal/loading.tsx | 21 - packages/website/ts/components/portal/menu.tsx | 120 -- packages/website/ts/components/portal/portal.tsx | 749 ------- packages/website/ts/components/portal/section.tsx | 14 - .../website/ts/components/portal/text_header.tsx | 16 - .../components/relayer_index/relayer_grid_tile.tsx | 148 -- .../ts/components/relayer_index/relayer_index.tsx | 126 -- .../relayer_index/relayer_top_tokens.tsx | 61 - .../ts/components/sections/landing/about.tsx | 81 - .../ts/components/sections/landing/clients.tsx | 110 - .../website/ts/components/sections/landing/cta.tsx | 29 - .../ts/components/sections/landing/hero.tsx | 31 - packages/website/ts/components/send_button.tsx | 94 - packages/website/ts/components/siteWrap.tsx | 146 -- packages/website/ts/components/slider/slider.tsx | 177 -- packages/website/ts/components/text.tsx | 77 - packages/website/ts/components/token_balances.tsx | 658 ------ .../ts/components/top_bar/provider_display.tsx | 154 -- packages/website/ts/components/top_bar/top_bar.tsx | 279 --- .../ts/components/top_bar/top_bar_menu_item.tsx | 47 - .../ts/components/track_token_confirmation.tsx | 61 - .../ts/components/trade_history/trade_history.tsx | 132 -- .../trade_history/trade_history_item.tsx | 176 -- .../ts/components/ui/account_connection.tsx | 40 - packages/website/ts/components/ui/alert.tsx | 25 - .../ts/components/ui/allowance_state_view.tsx | 51 - packages/website/ts/components/ui/balance.tsx | 27 - packages/website/ts/components/ui/button.tsx | 105 - packages/website/ts/components/ui/check_mark.tsx | 31 - packages/website/ts/components/ui/circle.tsx | 16 - packages/website/ts/components/ui/container.tsx | 100 - packages/website/ts/components/ui/copy_icon.tsx | 78 - .../website/ts/components/ui/custom_menu_item.tsx | 50 - packages/website/ts/components/ui/drop_down.tsx | 139 -- .../ui/ease_up_from_bottom_animation.tsx | 31 - .../website/ts/components/ui/ethereum_address.tsx | 30 - .../website/ts/components/ui/etherscan_icon.tsx | 39 - .../website/ts/components/ui/fake_text_field.tsx | 34 - .../website/ts/components/ui/flash_message.tsx | 40 - packages/website/ts/components/ui/help_tooltip.tsx | 22 - packages/website/ts/components/ui/icon_button.tsx | 64 - packages/website/ts/components/ui/identicon.tsx | 48 - packages/website/ts/components/ui/image.tsx | 49 - packages/website/ts/components/ui/input_label.tsx | 25 - packages/website/ts/components/ui/island.tsx | 29 - .../ts/components/ui/lifecycle_raised_button.tsx | 102 - packages/website/ts/components/ui/multi_select.tsx | 66 - packages/website/ts/components/ui/overlay.tsx | 32 - packages/website/ts/components/ui/party.tsx | 141 -- packages/website/ts/components/ui/pointer.tsx | 72 - .../website/ts/components/ui/required_label.tsx | 15 - packages/website/ts/components/ui/retry.tsx | 32 - packages/website/ts/components/ui/simple_menu.tsx | 88 - packages/website/ts/components/ui/spinner.tsx | 54 - packages/website/ts/components/ui/swap_icon.tsx | 41 - packages/website/ts/components/ui/text.tsx | 79 - packages/website/ts/components/ui/token_icon.tsx | 34 - packages/website/ts/components/visual_order.tsx | 73 - .../website/ts/components/wallet/body_overlay.tsx | 136 -- .../ts/components/wallet/null_token_row.tsx | 41 - .../website/ts/components/wallet/placeholder.tsx | 25 - .../ts/components/wallet/standard_icon_row.tsx | 44 - packages/website/ts/components/wallet/wallet.tsx | 527 ----- .../ts/components/wallet/wrap_ether_item.tsx | 230 -- packages/website/ts/constants/.gitkeep | 0 packages/website/ts/constants/animations.tsx | 18 - packages/website/ts/constants/cssReset.js | 50 - packages/website/ts/constants/globalStyle.tsx | 107 - packages/website/ts/constants/utilities.tsx | 22 - .../ts/containers/asset_buyer_documentation.ts | 46 - .../website/ts/containers/connect_documentation.ts | 51 - .../containers/contract_wrappers_documentation.ts | 46 - packages/website/ts/containers/docs_home.ts | 32 - .../ts/containers/ethereum_types_documentation.ts | 42 - packages/website/ts/containers/faq.ts | 28 - .../website/ts/containers/generate_order_form.ts | 48 - .../ts/containers/inputs/allowance_state_toggle.ts | 42 - .../ts/containers/inputs/eth_amount_input.ts | 36 - .../ts/containers/json_schemas_documentation.ts | 71 - .../ts/containers/migrations_documentation.ts | 67 - packages/website/ts/containers/not_found.ts | 28 - .../ts/containers/order_utils_documentation.ts | 47 - .../ts/containers/order_watcher_documentation.ts | 47 - packages/website/ts/containers/portal.ts | 93 - .../ts/containers/portal_onboarding_flow.ts | 68 - .../ts/containers/smart_contracts_documentation.ts | 97 - .../ts/containers/sol_compiler_documentation.ts | 51 - .../ts/containers/sol_coverage_documentation.ts | 44 - .../ts/containers/sol_profiler_documentation.ts | 44 - .../ts/containers/sol_trace_documentation.ts | 44 - .../ts/containers/subproviders_documentation.ts | 50 - .../ts/containers/web3_wrapper_documentation.ts | 46 - packages/website/ts/containers/wiki.ts | 31 - .../ts/containers/zero_ex_js_documentation.ts | 78 - packages/website/ts/globals.d.ts | 33 - packages/website/ts/icons/illustrations/0x.svg | 14 - .../ts/icons/illustrations/buildBusiness.svg | 6 - .../website/ts/icons/illustrations/checkmark.svg | 1 - .../website/ts/icons/illustrations/code-repo.svg | 7 - packages/website/ts/icons/illustrations/coin.svg | 1 - .../ts/icons/illustrations/consistently-ship.svg | 6 - .../website/ts/icons/illustrations/customize.svg | 1 - .../ts/icons/illustrations/decentralisedLoans.svg | 13 - .../website/ts/icons/illustrations/description.svg | 21 - .../ts/icons/illustrations/descriptionBolt.svg | 4 - .../ts/icons/illustrations/descriptionCoin.svg | 9 - .../ts/icons/illustrations/descriptionCopy.svg | 7 - .../ts/icons/illustrations/descriptionFlask.svg | 7 - .../ts/icons/illustrations/eficientDesign.svg | 11 - .../ts/icons/illustrations/eth-based-tokens.svg | 6 - .../icons/illustrations/extensibleArchitecture.svg | 11 - .../ts/icons/illustrations/flexibleIntegration.svg | 12 - .../illustrations/flexibleIntegration0xInstant.svg | 17 - .../ts/icons/illustrations/flexibleOrders.svg | 4 - .../icons/illustrations/gamingAndCollectibles.svg | 18 - .../generateRevenueForYourBusiness-large.svg | 28 - .../website/ts/icons/illustrations/getInTouch.svg | 13 - .../website/ts/icons/illustrations/getStarted.svg | 13 - .../website/ts/icons/illustrations/launchKit.svg | 18 - .../ts/icons/illustrations/launchKit_versionB.svg | 7 - .../ts/icons/illustrations/legalResources.svg | 4 - .../website/ts/icons/illustrations/logo-mark.svg | 6 - .../ts/icons/illustrations/logo-outlined.svg | 14 - .../ts/icons/illustrations/long-term-impact.svg | 9 - .../website/ts/icons/illustrations/low-cost.svg | 30 - .../ts/icons/illustrations/marketingDesignHelp.svg | 11 - .../ts/icons/illustrations/milestoneGrants.svg | 7 - .../illustrations/networkedLiquidity-small.svg | 20 - .../ts/icons/illustrations/networkedLiquidity.svg | 28 - .../website/ts/icons/illustrations/orderBooks.svg | 8 - .../ts/icons/illustrations/predictionMarkets.svg | 7 - .../website/ts/icons/illustrations/protocol.svg | 1 - .../ts/icons/illustrations/ready-to-build.svg | 1 - .../ts/icons/illustrations/recruitingSupport.svg | 7 - .../website/ts/icons/illustrations/right-thing.svg | 6 - .../icons/illustrations/robustSmartContracts.svg | 6 - .../website/ts/icons/illustrations/rocketship.svg | 9 - .../ts/icons/illustrations/secureTrading.svg | 15 - .../ts/icons/illustrations/social-discord.svg | 3 - .../website/ts/icons/illustrations/social-fb.svg | 3 - .../ts/icons/illustrations/social-github.svg | 3 - .../ts/icons/illustrations/social-newsletter.svg | 3 - .../ts/icons/illustrations/social-reddit.svg | 3 - .../ts/icons/illustrations/social-twitter.svg | 3 - .../ts/icons/illustrations/stableTokens.svg | 10 - .../ts/icons/illustrations/standardForExchange.svg | 12 - .../website/ts/icons/illustrations/support.svg | 1 - .../supportForAllEthereumStandards-large.svg | 28 - .../supportForAllEthereumStandards.svg | 21 - .../website/ts/icons/illustrations/techSupport.svg | 13 - packages/website/ts/icons/illustrations/tokens.svg | 1 - .../ts/icons/illustrations/vcIntroductions.svg | 11 - packages/website/ts/icons/logo-with-type.svg | 1 - packages/website/ts/index.tsx | 222 -- packages/website/ts/lazy_component.tsx | 66 - packages/website/ts/local_storage/local_storage.ts | 45 - packages/website/ts/local_storage/state_storage.ts | 16 - .../ts/local_storage/tracked_token_storage.ts | 71 - .../ts/local_storage/trade_history_storage.tsx | 94 - packages/website/ts/pages/about/jobs.tsx | 238 -- packages/website/ts/pages/about/mission.tsx | 97 - packages/website/ts/pages/about/press.tsx | 94 - packages/website/ts/pages/about/team.tsx | 291 --- packages/website/ts/pages/community.tsx | 289 --- .../ts/pages/documentation/developers_page.tsx | 201 -- .../website/ts/pages/documentation/doc_page.tsx | 216 -- .../website/ts/pages/documentation/docs_home.tsx | 469 ---- packages/website/ts/pages/ecosystem.tsx | 128 -- packages/website/ts/pages/faq/faq.tsx | 453 ---- packages/website/ts/pages/faq/question.tsx | 50 - packages/website/ts/pages/fullscreen_message.tsx | 30 - packages/website/ts/pages/instant.tsx | 255 --- packages/website/ts/pages/instant/code_demo.tsx | 183 -- .../website/ts/pages/instant/config_generator.tsx | 329 --- .../instant/config_generator_address_input.tsx | 84 - packages/website/ts/pages/instant/configurator.tsx | 104 - .../ts/pages/instant/fee_percentage_slider.tsx | 80 - packages/website/ts/pages/instant/rc-slider.css | 295 --- packages/website/ts/pages/instant/select.tsx | 74 - packages/website/ts/pages/landing.tsx | 44 - packages/website/ts/pages/launch_kit.tsx | 125 -- packages/website/ts/pages/market_maker.tsx | 162 -- packages/website/ts/pages/not_found.tsx | 25 - packages/website/ts/pages/why.tsx | 302 --- packages/website/ts/pages/wiki/wiki.tsx | 198 -- packages/website/ts/redux/analyticsMiddleware.ts | 36 - packages/website/ts/redux/dispatcher.ts | 227 -- packages/website/ts/redux/reducer.ts | 361 ---- packages/website/ts/redux/store.ts | 24 - packages/website/ts/schemas/metadata_schema.ts | 9 - packages/website/ts/schemas/portal_order_schema.ts | 9 - .../website/ts/schemas/portal_token_metadata.ts | 10 - packages/website/ts/schemas/validator.ts | 11 - packages/website/ts/style/colors.ts | 32 - packages/website/ts/style/keyframes.ts | 22 - packages/website/ts/style/media.ts | 14 - packages/website/ts/style/theme.ts | 17 - packages/website/ts/style/z_index.ts | 6 - packages/website/ts/types.ts | 667 ------ packages/website/ts/utils/analytics.ts | 89 - packages/website/ts/utils/backend_client.ts | 61 - packages/website/ts/utils/configs.ts | 49 - packages/website/ts/utils/constants.ts | 130 -- packages/website/ts/utils/doc_utils.ts | 85 - .../website/ts/utils/documentation_container.ts | 35 - packages/website/ts/utils/error_reporter.ts | 54 - packages/website/ts/utils/fake_token_registry.ts | 879 -------- packages/website/ts/utils/fetch_utils.ts | 48 - packages/website/ts/utils/mui_theme.ts | 32 - packages/website/ts/utils/order_parser.ts | 50 - .../website/ts/utils/token_address_overrides.ts | 24 - packages/website/ts/utils/translate.ts | 101 - packages/website/ts/utils/utils.ts | 483 ----- packages/website/ts/vendor/u2f_api.js | 760 ------- packages/website/tsconfig.json | 28 - packages/website/tslint.json | 11 - packages/website/webpack.config.js | 150 -- 1822 files changed, 206 insertions(+), 129145 deletions(-) delete mode 100644 packages/0x.js/.npmignore delete mode 100644 packages/0x.js/CHANGELOG.json delete mode 100644 packages/0x.js/CHANGELOG.md delete mode 100644 packages/0x.js/README.md delete mode 100644 packages/0x.js/coverage/.gitkeep delete mode 100644 packages/0x.js/package.json delete mode 100644 packages/0x.js/src/index.ts delete mode 100644 packages/0x.js/tsconfig.json delete mode 100644 packages/0x.js/tslint.json delete mode 100644 packages/0x.js/typedoc-tsconfig.json delete mode 100644 packages/0x.js/webpack.config.js delete mode 100644 packages/abi-gen-templates/CHANGELOG.json delete mode 100644 packages/abi-gen-templates/CHANGELOG.md delete mode 100644 packages/abi-gen-templates/README.md delete mode 100644 packages/abi-gen-templates/contract.handlebars delete mode 100644 packages/abi-gen-templates/package.json delete mode 100644 packages/abi-gen-templates/partials/call.handlebars delete mode 100644 packages/abi-gen-templates/partials/callAsync.handlebars delete mode 100644 packages/abi-gen-templates/partials/event.handlebars delete mode 100644 packages/abi-gen-templates/partials/params.handlebars delete mode 100644 packages/abi-gen-templates/partials/return_type.handlebars delete mode 100644 packages/abi-gen-templates/partials/tx.handlebars delete mode 100644 packages/abi-gen-templates/partials/typed_params.handlebars delete mode 100644 packages/abi-gen-wrappers/CHANGELOG.json delete mode 100644 packages/abi-gen-wrappers/CHANGELOG.md delete mode 100644 packages/abi-gen-wrappers/README.md delete mode 100644 packages/abi-gen-wrappers/package.json delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts delete mode 100644 packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts delete mode 100644 packages/abi-gen-wrappers/src/index.ts delete mode 100644 packages/abi-gen-wrappers/tsconfig.json delete mode 100644 packages/abi-gen-wrappers/tslint.json delete mode 100644 packages/abi-gen/.npmignore delete mode 100644 packages/abi-gen/CHANGELOG.json delete mode 100644 packages/abi-gen/CHANGELOG.md delete mode 100644 packages/abi-gen/README.md delete mode 100755 packages/abi-gen/bin/abi-gen.js delete mode 100644 packages/abi-gen/coverage/.gitkeep delete mode 100644 packages/abi-gen/package.json delete mode 100644 packages/abi-gen/src/globals.d.ts delete mode 100644 packages/abi-gen/src/index.ts delete mode 100644 packages/abi-gen/src/types.ts delete mode 100644 packages/abi-gen/src/utils.ts delete mode 100644 packages/abi-gen/test/utils_test.ts delete mode 100644 packages/abi-gen/tsconfig.json delete mode 100644 packages/abi-gen/tslint.json delete mode 100644 packages/assert/.npmignore delete mode 100644 packages/assert/CHANGELOG.json delete mode 100644 packages/assert/CHANGELOG.md delete mode 100644 packages/assert/README.md delete mode 100644 packages/assert/coverage/.gitkeep delete mode 100644 packages/assert/package.json delete mode 100644 packages/assert/src/globals.d.ts delete mode 100644 packages/assert/src/index.ts delete mode 100644 packages/assert/test/assert_test.ts delete mode 100644 packages/assert/tsconfig.json delete mode 100644 packages/assert/tslint.json delete mode 100644 packages/asset-buyer/.npmignore delete mode 100644 packages/asset-buyer/CHANGELOG.json delete mode 100644 packages/asset-buyer/CHANGELOG.md delete mode 100644 packages/asset-buyer/README.md delete mode 100644 packages/asset-buyer/package.json delete mode 100644 packages/asset-buyer/src/asset_buyer.ts delete mode 100644 packages/asset-buyer/src/constants.ts delete mode 100644 packages/asset-buyer/src/errors.ts delete mode 100644 packages/asset-buyer/src/globals.d.ts delete mode 100644 packages/asset-buyer/src/index.ts delete mode 100644 packages/asset-buyer/src/order_providers/basic_order_provider.ts delete mode 100644 packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts delete mode 100644 packages/asset-buyer/src/types.ts delete mode 100644 packages/asset-buyer/src/utils/assert.ts delete mode 100644 packages/asset-buyer/src/utils/asset_data_utils.ts delete mode 100644 packages/asset-buyer/src/utils/buy_quote_calculator.ts delete mode 100644 packages/asset-buyer/src/utils/calculate_liquidity.ts delete mode 100644 packages/asset-buyer/src/utils/order_provider_response_processor.ts delete mode 100644 packages/asset-buyer/src/utils/order_utils.ts delete mode 100644 packages/asset-buyer/test/asset_buyer_test.ts delete mode 100644 packages/asset-buyer/test/buy_quote_calculator_test.ts delete mode 100644 packages/asset-buyer/test/utils/chai_setup.ts delete mode 100644 packages/asset-buyer/test/utils/mocks.ts delete mode 100644 packages/asset-buyer/test/utils/test_helpers.ts delete mode 100644 packages/asset-buyer/tsconfig.json delete mode 100644 packages/asset-buyer/tslint.json delete mode 100644 packages/asset-buyer/typedoc-tsconfig.json delete mode 100644 packages/base-contract/.npmignore delete mode 100644 packages/base-contract/CHANGELOG.json delete mode 100644 packages/base-contract/CHANGELOG.md delete mode 100644 packages/base-contract/README.md delete mode 100644 packages/base-contract/coverage/.gitkeep delete mode 100644 packages/base-contract/package.json delete mode 100644 packages/base-contract/src/globals.d.ts delete mode 100644 packages/base-contract/src/index.ts delete mode 100644 packages/base-contract/src/utils.ts delete mode 100644 packages/base-contract/test/base_contract_test.ts delete mode 100644 packages/base-contract/test/utils_test.ts delete mode 100644 packages/base-contract/tsconfig.json delete mode 100644 packages/base-contract/tslint.json delete mode 100644 packages/connect/.npmignore delete mode 100644 packages/connect/CHANGELOG.json delete mode 100644 packages/connect/CHANGELOG.md delete mode 100644 packages/connect/README.md delete mode 100644 packages/connect/coverage/.gitkeep delete mode 100644 packages/connect/package.json delete mode 100644 packages/connect/src/globals.d.ts delete mode 100644 packages/connect/src/http_client.ts delete mode 100644 packages/connect/src/index.ts delete mode 100644 packages/connect/src/orders_channel_factory.ts delete mode 100644 packages/connect/src/types.ts delete mode 100644 packages/connect/src/utils/assert.ts delete mode 100644 packages/connect/src/utils/orders_channel_message_parser.ts delete mode 100644 packages/connect/src/utils/relayer_response_json_parsers.ts delete mode 100644 packages/connect/src/utils/type_converters.ts delete mode 100644 packages/connect/src/ws_orders_channel.ts delete mode 100644 packages/connect/test/fixtures/standard_relayer_api/asset_pairs.json delete mode 100644 packages/connect/test/fixtures/standard_relayer_api/asset_pairs.ts delete mode 100644 packages/connect/test/fixtures/standard_relayer_api/fee_recipients.json delete mode 100644 packages/connect/test/fixtures/standard_relayer_api/fee_recipients.ts delete mode 100644 packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json delete mode 100644 packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.ts delete mode 100644 packages/connect/test/fixtures/standard_relayer_api/order_config.json delete mode 100644 packages/connect/test/fixtures/standard_relayer_api/order_config.ts delete mode 100644 packages/connect/test/fixtures/standard_relayer_api/orderbook.json delete mode 100644 packages/connect/test/fixtures/standard_relayer_api/orderbook.ts delete mode 100644 packages/connect/test/fixtures/standard_relayer_api/orders.json delete mode 100644 packages/connect/test/fixtures/standard_relayer_api/orders.ts delete mode 100644 packages/connect/test/fixtures/standard_relayer_api/unknown_orders_channel_message.ts delete mode 100644 packages/connect/test/fixtures/standard_relayer_api/update_orders_channel_message.ts delete mode 100644 packages/connect/test/http_client_test.ts delete mode 100644 packages/connect/test/orders_channel_factory_test.ts delete mode 100644 packages/connect/test/orders_channel_message_parsers_test.ts delete mode 100644 packages/connect/test/ws_orders_channel_test.ts delete mode 100644 packages/connect/tsconfig.json delete mode 100644 packages/connect/tslint.json delete mode 100644 packages/connect/typedoc-tsconfig.json delete mode 100644 packages/contract-addresses/CHANGELOG.json delete mode 100644 packages/contract-addresses/CHANGELOG.md delete mode 100644 packages/contract-addresses/README.md delete mode 100644 packages/contract-addresses/package.json delete mode 100644 packages/contract-addresses/src/index.ts delete mode 100644 packages/contract-addresses/tsconfig.json delete mode 100644 packages/contract-addresses/tslint.json delete mode 100644 packages/contract-artifacts/CHANGELOG.json delete mode 100644 packages/contract-artifacts/CHANGELOG.md delete mode 100644 packages/contract-artifacts/README.md delete mode 100644 packages/contract-artifacts/artifacts/AssetProxyOwner.json delete mode 100644 packages/contract-artifacts/artifacts/DummyERC20Token.json delete mode 100644 packages/contract-artifacts/artifacts/DummyERC721Token.json delete mode 100644 packages/contract-artifacts/artifacts/DutchAuction.json delete mode 100644 packages/contract-artifacts/artifacts/ERC20Proxy.json delete mode 100644 packages/contract-artifacts/artifacts/ERC20Token.json delete mode 100644 packages/contract-artifacts/artifacts/ERC721Proxy.json delete mode 100644 packages/contract-artifacts/artifacts/ERC721Token.json delete mode 100644 packages/contract-artifacts/artifacts/Exchange.json delete mode 100644 packages/contract-artifacts/artifacts/Forwarder.json delete mode 100644 packages/contract-artifacts/artifacts/IValidator.json delete mode 100644 packages/contract-artifacts/artifacts/IWallet.json delete mode 100644 packages/contract-artifacts/artifacts/MultiAssetProxy.json delete mode 100644 packages/contract-artifacts/artifacts/OrderValidator.json delete mode 100644 packages/contract-artifacts/artifacts/WETH9.json delete mode 100644 packages/contract-artifacts/artifacts/ZRXToken.json delete mode 100644 packages/contract-artifacts/package.json delete mode 100644 packages/contract-artifacts/src/index.ts delete mode 100644 packages/contract-artifacts/tsconfig.json delete mode 100644 packages/contract-artifacts/tslint.json delete mode 100644 packages/contract-wrappers/.npmignore delete mode 100644 packages/contract-wrappers/CHANGELOG.json delete mode 100644 packages/contract-wrappers/CHANGELOG.md delete mode 100644 packages/contract-wrappers/README.md delete mode 100644 packages/contract-wrappers/coverage/.gitkeep delete mode 100644 packages/contract-wrappers/package.json delete mode 100644 packages/contract-wrappers/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts delete mode 100644 packages/contract-wrappers/src/contract_wrappers.ts delete mode 100644 packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts delete mode 100644 packages/contract-wrappers/src/contract_wrappers/dutch_auction_wrapper.ts delete mode 100644 packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts delete mode 100644 packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts delete mode 100644 packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts delete mode 100644 packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts delete mode 100644 packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts delete mode 100644 packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts delete mode 100644 packages/contract-wrappers/src/contract_wrappers/forwarder_wrapper.ts delete mode 100644 packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts delete mode 100644 packages/contract-wrappers/src/fetchers/asset_balance_and_proxy_allowance_fetcher.ts delete mode 100644 packages/contract-wrappers/src/fetchers/order_filled_cancelled_fetcher.ts delete mode 100644 packages/contract-wrappers/src/index.ts delete mode 100644 packages/contract-wrappers/src/schemas/contract_wrappers_config_schema.ts delete mode 100644 packages/contract-wrappers/src/schemas/method_opts_schema.ts delete mode 100644 packages/contract-wrappers/src/schemas/order_tx_opts_schema.ts delete mode 100644 packages/contract-wrappers/src/schemas/tx_opts_schema.ts delete mode 100644 packages/contract-wrappers/src/schemas/validate_order_fillable_opts_schema.ts delete mode 100644 packages/contract-wrappers/src/types.ts delete mode 100644 packages/contract-wrappers/src/utils/assert.ts delete mode 100644 packages/contract-wrappers/src/utils/calldata_optimization_utils.ts delete mode 100644 packages/contract-wrappers/src/utils/constants.ts delete mode 100644 packages/contract-wrappers/src/utils/contract_addresses.ts delete mode 100644 packages/contract-wrappers/src/utils/decorators.ts delete mode 100644 packages/contract-wrappers/src/utils/exchange_transfer_simulator.ts delete mode 100644 packages/contract-wrappers/src/utils/filter_utils.ts delete mode 100644 packages/contract-wrappers/src/utils/transaction_encoder.ts delete mode 100644 packages/contract-wrappers/src/utils/utils.ts delete mode 100644 packages/contract-wrappers/test/calldata_optimization_utils_test.ts delete mode 100644 packages/contract-wrappers/test/dutch_auction_wrapper_test.ts delete mode 100644 packages/contract-wrappers/test/erc20_proxy_wrapper_test.ts delete mode 100644 packages/contract-wrappers/test/erc20_wrapper_test.ts delete mode 100644 packages/contract-wrappers/test/erc721_proxy_wrapper_test.ts delete mode 100644 packages/contract-wrappers/test/erc721_wrapper_test.ts delete mode 100644 packages/contract-wrappers/test/ether_token_wrapper_test.ts delete mode 100644 packages/contract-wrappers/test/exchange_wrapper_test.ts delete mode 100644 packages/contract-wrappers/test/forwarder_wrapper_test.ts delete mode 100644 packages/contract-wrappers/test/global_hooks.ts delete mode 100644 packages/contract-wrappers/test/order_validator_wrapper_test.ts delete mode 100644 packages/contract-wrappers/test/revert_validation_test.ts delete mode 100644 packages/contract-wrappers/test/subscription_test.ts delete mode 100644 packages/contract-wrappers/test/transaction_encoder_test.ts delete mode 100644 packages/contract-wrappers/test/utils/chai_setup.ts delete mode 100644 packages/contract-wrappers/test/utils/constants.ts delete mode 100644 packages/contract-wrappers/test/utils/dutch_auction_utils.ts delete mode 100644 packages/contract-wrappers/test/utils/migrate.ts delete mode 100644 packages/contract-wrappers/test/utils/token_utils.ts delete mode 100644 packages/contract-wrappers/test/utils/web3_wrapper.ts delete mode 100644 packages/contract-wrappers/tsconfig.json delete mode 100644 packages/contract-wrappers/tslint.json delete mode 100644 packages/contract-wrappers/typedoc-tsconfig.json delete mode 100644 packages/dev-tools-pages/.gitignore delete mode 100644 packages/dev-tools-pages/README.md delete mode 100644 packages/dev-tools-pages/assets/crawl.html delete mode 100644 packages/dev-tools-pages/assets/favicons/compiler.ico delete mode 100644 packages/dev-tools-pages/assets/favicons/cov.ico delete mode 100644 packages/dev-tools-pages/assets/favicons/profiler.ico delete mode 100644 packages/dev-tools-pages/assets/favicons/trace.ico delete mode 100644 packages/dev-tools-pages/assets/fonts/MaisonNeue-Bold-subset.woff2 delete mode 100644 packages/dev-tools-pages/assets/fonts/MaisonNeue-Book-subset.woff2 delete mode 100644 packages/dev-tools-pages/assets/images/og-compiler.png delete mode 100644 packages/dev-tools-pages/assets/images/og-cov.png delete mode 100644 packages/dev-tools-pages/assets/images/og-profiler.png delete mode 100644 packages/dev-tools-pages/assets/images/og-trace.png delete mode 100644 packages/dev-tools-pages/assets/index.html delete mode 100644 packages/dev-tools-pages/package.json delete mode 100644 packages/dev-tools-pages/pages.js delete mode 100644 packages/dev-tools-pages/ts/components/animations/compiler/data.json delete mode 100644 packages/dev-tools-pages/ts/components/animations/compiler/index.tsx delete mode 100644 packages/dev-tools-pages/ts/components/animations/cov/data.json delete mode 100644 packages/dev-tools-pages/ts/components/animations/cov/index.tsx delete mode 100644 packages/dev-tools-pages/ts/components/animations/index.tsx delete mode 100644 packages/dev-tools-pages/ts/components/animations/profiler/data.json delete mode 100644 packages/dev-tools-pages/ts/components/animations/profiler/index.tsx delete mode 100644 packages/dev-tools-pages/ts/components/animations/trace/data.json delete mode 100644 packages/dev-tools-pages/ts/components/animations/trace/index.tsx delete mode 100644 packages/dev-tools-pages/ts/components/base.tsx delete mode 100644 packages/dev-tools-pages/ts/components/breakout.tsx delete mode 100644 packages/dev-tools-pages/ts/components/button.tsx delete mode 100644 packages/dev-tools-pages/ts/components/call_to_action.tsx delete mode 100644 packages/dev-tools-pages/ts/components/code.tsx delete mode 100644 packages/dev-tools-pages/ts/components/compiler.tsx delete mode 100644 packages/dev-tools-pages/ts/components/container.tsx delete mode 100644 packages/dev-tools-pages/ts/components/content-block.tsx delete mode 100644 packages/dev-tools-pages/ts/components/content.tsx delete mode 100644 packages/dev-tools-pages/ts/components/footer.tsx delete mode 100644 packages/dev-tools-pages/ts/components/header.tsx delete mode 100644 packages/dev-tools-pages/ts/components/hero.tsx delete mode 100644 packages/dev-tools-pages/ts/components/inline-code.tsx delete mode 100644 packages/dev-tools-pages/ts/components/intro.tsx delete mode 100644 packages/dev-tools-pages/ts/components/list.tsx delete mode 100644 packages/dev-tools-pages/ts/components/tabs.tsx delete mode 100644 packages/dev-tools-pages/ts/components/trace.tsx delete mode 100644 packages/dev-tools-pages/ts/components/typography.tsx delete mode 100644 packages/dev-tools-pages/ts/context/compiler.tsx delete mode 100644 packages/dev-tools-pages/ts/context/coverage.tsx delete mode 100644 packages/dev-tools-pages/ts/context/index.tsx delete mode 100644 packages/dev-tools-pages/ts/context/profiler.tsx delete mode 100644 packages/dev-tools-pages/ts/context/trace.tsx delete mode 100644 packages/dev-tools-pages/ts/globalStyles.tsx delete mode 100644 packages/dev-tools-pages/ts/globals.d.ts delete mode 100644 packages/dev-tools-pages/ts/highlight.tsx delete mode 100644 packages/dev-tools-pages/ts/icons/exact-location.svg delete mode 100644 packages/dev-tools-pages/ts/icons/logos/0x.svg delete mode 100644 packages/dev-tools-pages/ts/icons/logos/compiler.svg delete mode 100644 packages/dev-tools-pages/ts/icons/logos/cov.svg delete mode 100644 packages/dev-tools-pages/ts/icons/logos/profiler.svg delete mode 100644 packages/dev-tools-pages/ts/icons/logos/trace.svg delete mode 100644 packages/dev-tools-pages/ts/icons/no-location.svg delete mode 100644 packages/dev-tools-pages/ts/icons/time-consuming.svg delete mode 100644 packages/dev-tools-pages/ts/icons/time-saving.svg delete mode 100644 packages/dev-tools-pages/ts/pages/compiler.tsx delete mode 100644 packages/dev-tools-pages/ts/pages/coverage.tsx delete mode 100644 packages/dev-tools-pages/ts/pages/profiler.tsx delete mode 100644 packages/dev-tools-pages/ts/pages/trace.tsx delete mode 100644 packages/dev-tools-pages/ts/variables.tsx delete mode 100644 packages/dev-tools-pages/tsconfig.json delete mode 100644 packages/dev-tools-pages/tslint.json delete mode 100644 packages/dev-tools-pages/webpack.config.js delete mode 100644 packages/dev-utils/.npmignore delete mode 100644 packages/dev-utils/CHANGELOG.json delete mode 100644 packages/dev-utils/CHANGELOG.md delete mode 100644 packages/dev-utils/README.md delete mode 100644 packages/dev-utils/coverage/.gitkeep delete mode 100644 packages/dev-utils/package.json delete mode 100644 packages/dev-utils/src/blockchain_lifecycle.ts delete mode 100644 packages/dev-utils/src/callback_error_reporter.ts delete mode 100644 packages/dev-utils/src/constants.ts delete mode 100644 packages/dev-utils/src/env.ts delete mode 100644 packages/dev-utils/src/globals.d.ts delete mode 100644 packages/dev-utils/src/index.ts delete mode 100644 packages/dev-utils/src/web3_factory.ts delete mode 100644 packages/dev-utils/test/.npmignore delete mode 100644 packages/dev-utils/test/blockchain_lifecycle_test.ts delete mode 100644 packages/dev-utils/test/rpc_test.ts delete mode 100644 packages/dev-utils/tsconfig.json delete mode 100644 packages/dev-utils/tslint.json delete mode 100644 packages/devnet/Dockerfile delete mode 100644 packages/devnet/README.md delete mode 100644 packages/devnet/genesis.json delete mode 100644 packages/devnet/node0/keystore/UTC--2018-05-11T21-29-08.903003751Z--5409ed021d9299bf6814279a6a1411a7e866a631 delete mode 100644 packages/devnet/node0/keystore/UTC--2018-05-11T21-29-09.794553183Z--6ecbe1db9ef729cbe972c83fb886247691fb6beb delete mode 100644 packages/devnet/node0/keystore/UTC--2018-05-11T21-29-10.696351411Z--e36ea790bc9d7ab70c55260c66d52b1eca985f84 delete mode 100644 packages/devnet/node0/keystore/UTC--2018-05-11T21-29-11.479938556Z--e834ec434daba538cd1b9fe1582052b880bd7e63 delete mode 100644 packages/devnet/node0/keystore/UTC--2018-05-11T21-29-12.260348580Z--78dc5d2d739606d31509c31d654056a45185ecb6 delete mode 100644 packages/devnet/node0/keystore/UTC--2018-05-11T21-29-13.178294829Z--a8dda8d7f5310e4a9e24f8eba77e091ac264f872 delete mode 100644 packages/devnet/node0/keystore/UTC--2018-05-11T21-29-13.960499696Z--06cef8e666768cc40cc78cf93d9611019ddcb628 delete mode 100644 packages/devnet/node0/keystore/UTC--2018-05-11T21-29-14.757010386Z--4404ac8bd8f9618d27ad2f1485aa1b2cfd82482d delete mode 100644 packages/devnet/node0/keystore/UTC--2018-05-11T21-29-15.554233052Z--7457d5e02197480db681d3fdf256c7aca21bdc12 delete mode 100644 packages/devnet/node0/keystore/UTC--2018-05-11T21-29-16.342711541Z--91c987bf62d25945db517bdaa840a6c661374402 delete mode 100644 packages/devnet/node0/keystore/UTC--2018-05-15T21-50-24.532037737Z--e8816898d851d5b61b7f950627d04d794c07ca37 delete mode 100644 packages/devnet/node0/password.txt delete mode 100755 packages/devnet/run.sh delete mode 100644 packages/ethereum-types/.npmignore delete mode 100644 packages/ethereum-types/CHANGELOG.json delete mode 100644 packages/ethereum-types/CHANGELOG.md delete mode 100644 packages/ethereum-types/README.md delete mode 100644 packages/ethereum-types/package.json delete mode 100644 packages/ethereum-types/src/globals.d.ts delete mode 100644 packages/ethereum-types/src/index.ts delete mode 100644 packages/ethereum-types/tsconfig.json delete mode 100644 packages/ethereum-types/tslint.json delete mode 100644 packages/ethereum-types/typedoc-tsconfig.json delete mode 100644 packages/fill-scenarios/.npmignore delete mode 100644 packages/fill-scenarios/CHANGELOG.json delete mode 100644 packages/fill-scenarios/CHANGELOG.md delete mode 100644 packages/fill-scenarios/README.md delete mode 100644 packages/fill-scenarios/package.json delete mode 100644 packages/fill-scenarios/src/constants.ts delete mode 100644 packages/fill-scenarios/src/fill_scenarios.ts delete mode 100644 packages/fill-scenarios/src/index.ts delete mode 100644 packages/fill-scenarios/tsconfig.json delete mode 100644 packages/fill-scenarios/tslint.json delete mode 100644 packages/instant/.DS_Store delete mode 100644 packages/instant/.dogfood.discharge.json delete mode 100644 packages/instant/.env_example delete mode 100644 packages/instant/.gitignore delete mode 100644 packages/instant/.npmignore delete mode 100644 packages/instant/.production.discharge.json delete mode 100644 packages/instant/.staging.discharge.json delete mode 100644 packages/instant/CHANGELOG.json delete mode 100644 packages/instant/CHANGELOG.md delete mode 100644 packages/instant/README.md delete mode 100644 packages/instant/jest.config.js delete mode 100644 packages/instant/package.json delete mode 100644 packages/instant/public/external.css delete mode 100644 packages/instant/public/index.html delete mode 100644 packages/instant/src/assets/icons/ae.svg delete mode 100644 packages/instant/src/assets/icons/agi.svg delete mode 100644 packages/instant/src/assets/icons/ant.svg delete mode 100644 packages/instant/src/assets/icons/ast.svg delete mode 100644 packages/instant/src/assets/icons/bat.svg delete mode 100644 packages/instant/src/assets/icons/cvc.svg delete mode 100644 packages/instant/src/assets/icons/dai.svg delete mode 100644 packages/instant/src/assets/icons/dgd.svg delete mode 100644 packages/instant/src/assets/icons/dgx.svg delete mode 100644 packages/instant/src/assets/icons/dnt.svg delete mode 100644 packages/instant/src/assets/icons/fun.svg delete mode 100644 packages/instant/src/assets/icons/gno.svg delete mode 100644 packages/instant/src/assets/icons/gnt.svg delete mode 100644 packages/instant/src/assets/icons/knc.svg delete mode 100644 packages/instant/src/assets/icons/link.svg delete mode 100644 packages/instant/src/assets/icons/lpt.svg delete mode 100644 packages/instant/src/assets/icons/mana.svg delete mode 100644 packages/instant/src/assets/icons/mkr.svg delete mode 100644 packages/instant/src/assets/icons/mln.svg delete mode 100644 packages/instant/src/assets/icons/omg.svg delete mode 100644 packages/instant/src/assets/icons/powr.svg delete mode 100644 packages/instant/src/assets/icons/ren.svg delete mode 100644 packages/instant/src/assets/icons/rep.svg delete mode 100644 packages/instant/src/assets/icons/req.svg delete mode 100644 packages/instant/src/assets/icons/salt.svg delete mode 100644 packages/instant/src/assets/icons/snt.svg delete mode 100644 packages/instant/src/assets/icons/spank.svg delete mode 100644 packages/instant/src/assets/icons/wax.svg delete mode 100644 packages/instant/src/assets/icons/zil.svg delete mode 100644 packages/instant/src/assets/icons/zrx.svg delete mode 100644 packages/instant/src/assets/powered_by_0x.svg delete mode 100644 packages/instant/src/components/amount_placeholder.tsx delete mode 100644 packages/instant/src/components/animations/full_rotation.tsx delete mode 100644 packages/instant/src/components/animations/position_animation.tsx delete mode 100644 packages/instant/src/components/animations/pulse.tsx delete mode 100644 packages/instant/src/components/animations/slide_animation.tsx delete mode 100644 packages/instant/src/components/buy_button.tsx delete mode 100644 packages/instant/src/components/buy_order_progress.tsx delete mode 100644 packages/instant/src/components/buy_order_state_buttons.tsx delete mode 100644 packages/instant/src/components/coinbase_wallet_logo.tsx delete mode 100644 packages/instant/src/components/css_reset.tsx delete mode 100644 packages/instant/src/components/erc20_asset_amount_input.tsx delete mode 100644 packages/instant/src/components/erc20_token_selector.tsx delete mode 100644 packages/instant/src/components/install_wallet_panel_content.tsx delete mode 100644 packages/instant/src/components/instant_heading.tsx delete mode 100644 packages/instant/src/components/meta_mask_logo.tsx delete mode 100644 packages/instant/src/components/order_details.tsx delete mode 100644 packages/instant/src/components/payment_method.tsx delete mode 100644 packages/instant/src/components/payment_method_dropdown.tsx delete mode 100644 packages/instant/src/components/placing_order_button.tsx delete mode 100644 packages/instant/src/components/scaling_amount_input.tsx delete mode 100644 packages/instant/src/components/scaling_input.tsx delete mode 100644 packages/instant/src/components/search_input.tsx delete mode 100644 packages/instant/src/components/secondary_button.tsx delete mode 100644 packages/instant/src/components/section_header.tsx delete mode 100644 packages/instant/src/components/sliding_error.tsx delete mode 100644 packages/instant/src/components/sliding_panel.tsx delete mode 100644 packages/instant/src/components/standard_panel_content.tsx delete mode 100644 packages/instant/src/components/standard_sliding_panel.tsx delete mode 100644 packages/instant/src/components/time_counter.tsx delete mode 100644 packages/instant/src/components/timed_progress_bar.tsx delete mode 100644 packages/instant/src/components/ui/button.tsx delete mode 100644 packages/instant/src/components/ui/circle.tsx delete mode 100644 packages/instant/src/components/ui/container.tsx delete mode 100644 packages/instant/src/components/ui/dropdown.tsx delete mode 100644 packages/instant/src/components/ui/flex.tsx delete mode 100644 packages/instant/src/components/ui/icon.tsx delete mode 100644 packages/instant/src/components/ui/input.tsx delete mode 100644 packages/instant/src/components/ui/overlay.tsx delete mode 100644 packages/instant/src/components/ui/spinner.tsx delete mode 100644 packages/instant/src/components/ui/text.tsx delete mode 100644 packages/instant/src/components/wallet_prompt.tsx delete mode 100644 packages/instant/src/components/zero_ex_instant.tsx delete mode 100644 packages/instant/src/components/zero_ex_instant_container.tsx delete mode 100644 packages/instant/src/components/zero_ex_instant_overlay.tsx delete mode 100644 packages/instant/src/components/zero_ex_instant_provider.tsx delete mode 100644 packages/instant/src/constants.ts delete mode 100644 packages/instant/src/containers/available_erc20_token_selector.ts delete mode 100644 packages/instant/src/containers/connected_account_payment_method.ts delete mode 100644 packages/instant/src/containers/connected_buy_order_progress_or_payment_method.tsx delete mode 100644 packages/instant/src/containers/current_standard_sliding_panel.ts delete mode 100644 packages/instant/src/containers/latest_buy_quote_order_details.ts delete mode 100644 packages/instant/src/containers/latest_error.tsx delete mode 100644 packages/instant/src/containers/selected_asset_buy_order_progress.ts delete mode 100644 packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts delete mode 100644 packages/instant/src/containers/selected_asset_instant_heading.ts delete mode 100644 packages/instant/src/containers/selected_asset_theme_provider.ts delete mode 100644 packages/instant/src/containers/selected_erc20_asset_amount_input.ts delete mode 100644 packages/instant/src/data/asset_data_network_mapping.ts delete mode 100644 packages/instant/src/data/asset_meta_data_map.ts delete mode 100644 packages/instant/src/globals.d.ts delete mode 100644 packages/instant/src/index.ts delete mode 100644 packages/instant/src/index.umd.ts delete mode 100644 packages/instant/src/redux/actions.ts delete mode 100644 packages/instant/src/redux/analytics_middleware.ts delete mode 100644 packages/instant/src/redux/async_data.ts delete mode 100644 packages/instant/src/redux/reducer.ts delete mode 100644 packages/instant/src/redux/store.ts delete mode 100644 packages/instant/src/style/fonts.ts delete mode 100644 packages/instant/src/style/media.ts delete mode 100644 packages/instant/src/style/theme.ts delete mode 100644 packages/instant/src/style/util.ts delete mode 100644 packages/instant/src/style/z_index.ts delete mode 100644 packages/instant/src/types.ts delete mode 100644 packages/instant/src/util/address.ts delete mode 100644 packages/instant/src/util/analytics.ts delete mode 100644 packages/instant/src/util/assert.ts delete mode 100644 packages/instant/src/util/asset.ts delete mode 100644 packages/instant/src/util/asset_buyer_factory.ts delete mode 100644 packages/instant/src/util/buy_quote_updater.ts delete mode 100644 packages/instant/src/util/coinbase_api.ts delete mode 100644 packages/instant/src/util/env.ts delete mode 100644 packages/instant/src/util/error_flasher.ts delete mode 100644 packages/instant/src/util/error_reporter.ts delete mode 100644 packages/instant/src/util/etherscan.ts delete mode 100644 packages/instant/src/util/format.ts delete mode 100644 packages/instant/src/util/gas_price_estimator.ts delete mode 100644 packages/instant/src/util/heap.ts delete mode 100644 packages/instant/src/util/heartbeater.ts delete mode 100644 packages/instant/src/util/heartbeater_factory.ts delete mode 100644 packages/instant/src/util/maybe_big_number.ts delete mode 100644 packages/instant/src/util/provider_factory.ts delete mode 100644 packages/instant/src/util/provider_state_factory.ts delete mode 100644 packages/instant/src/util/time.ts delete mode 100644 packages/instant/src/util/util.ts delete mode 100644 packages/instant/test/components/zero_ex_instant.test.tsx delete mode 100644 packages/instant/test/util/asset.test.ts delete mode 100644 packages/instant/test/util/format.test.ts delete mode 100644 packages/instant/test/util/time.test.ts delete mode 100644 packages/instant/tsconfig.json delete mode 100644 packages/instant/tslint.json delete mode 100644 packages/instant/typedoc-tsconfig.json delete mode 100644 packages/instant/webpack.config.js delete mode 100644 packages/json-schemas/.npmignore delete mode 100644 packages/json-schemas/CHANGELOG.json delete mode 100644 packages/json-schemas/CHANGELOG.md delete mode 100644 packages/json-schemas/README.md delete mode 100644 packages/json-schemas/coverage/.gitkeep delete mode 100644 packages/json-schemas/package.json delete mode 100644 packages/json-schemas/schemas/address_schema.json delete mode 100644 packages/json-schemas/schemas/asset_pairs_request_opts_schema.json delete mode 100644 packages/json-schemas/schemas/block_param_schema.json delete mode 100644 packages/json-schemas/schemas/block_range_schema.json delete mode 100644 packages/json-schemas/schemas/call_data_schema.json delete mode 100644 packages/json-schemas/schemas/ec_signature_parameter_schema.json delete mode 100644 packages/json-schemas/schemas/ec_signature_schema.json delete mode 100644 packages/json-schemas/schemas/eip712_typed_data_schema.json delete mode 100644 packages/json-schemas/schemas/hex_schema.json delete mode 100644 packages/json-schemas/schemas/index_filter_values_schema.json delete mode 100644 packages/json-schemas/schemas/js_number_schema.json delete mode 100644 packages/json-schemas/schemas/number_schema.json delete mode 100644 packages/json-schemas/schemas/order_cancel_schema.json delete mode 100644 packages/json-schemas/schemas/order_config_request_schema.json delete mode 100644 packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json delete mode 100644 packages/json-schemas/schemas/order_fill_requests_schema.json delete mode 100644 packages/json-schemas/schemas/order_hash_schema.json delete mode 100644 packages/json-schemas/schemas/order_schema.json delete mode 100644 packages/json-schemas/schemas/order_watcher_web_socket_request_schema.json delete mode 100644 packages/json-schemas/schemas/order_watcher_web_socket_utf8_message_schema.json delete mode 100644 packages/json-schemas/schemas/orderbook_request_schema.json delete mode 100644 packages/json-schemas/schemas/orders_request_opts_schema.json delete mode 100644 packages/json-schemas/schemas/orders_schema.json delete mode 100644 packages/json-schemas/schemas/paged_request_opts_schema.json delete mode 100644 packages/json-schemas/schemas/paginated_collection_schema.json delete mode 100644 packages/json-schemas/schemas/relayer_api_asset_data_pairs_response_schema.json delete mode 100644 packages/json-schemas/schemas/relayer_api_asset_data_pairs_schema.json delete mode 100644 packages/json-schemas/schemas/relayer_api_asset_data_trade_info_schema.json delete mode 100644 packages/json-schemas/schemas/relayer_api_error_response_schema.json delete mode 100644 packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json delete mode 100644 packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json delete mode 100644 packages/json-schemas/schemas/relayer_api_order_config_response_schema.json delete mode 100644 packages/json-schemas/schemas/relayer_api_order_schema.json delete mode 100644 packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json delete mode 100644 packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json delete mode 100644 packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json delete mode 100644 packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json delete mode 100644 packages/json-schemas/schemas/relayer_api_orders_response_schema.json delete mode 100644 packages/json-schemas/schemas/relayer_api_orders_schema.json delete mode 100644 packages/json-schemas/schemas/request_opts_schema.json delete mode 100644 packages/json-schemas/schemas/signed_order_schema.json delete mode 100644 packages/json-schemas/schemas/signed_orders_schema.json delete mode 100644 packages/json-schemas/schemas/token_schema.json delete mode 100644 packages/json-schemas/schemas/tx_data_schema.json delete mode 100644 packages/json-schemas/schemas/whole_number_schema.json delete mode 100644 packages/json-schemas/schemas/zero_ex_transaction_schema.json delete mode 100644 packages/json-schemas/src/index.ts delete mode 100644 packages/json-schemas/src/schema_validator.ts delete mode 100644 packages/json-schemas/src/schemas.ts delete mode 100644 packages/json-schemas/test/schema_test.ts delete mode 100644 packages/json-schemas/tsconfig.json delete mode 100644 packages/json-schemas/tslint.json delete mode 100644 packages/json-schemas/typedoc-tsconfig.json delete mode 100644 packages/metacoin/README.md delete mode 100644 packages/metacoin/compiler.json delete mode 100644 packages/metacoin/contracts/Metacoin.sol delete mode 100644 packages/metacoin/coverage/.gitkeep delete mode 100644 packages/metacoin/package.json delete mode 100644 packages/metacoin/src/global.d.ts delete mode 100644 packages/metacoin/test/global_hooks.ts delete mode 100644 packages/metacoin/test/metacoin_test.ts delete mode 100644 packages/metacoin/test/utils/chai_setup.ts delete mode 100644 packages/metacoin/test/utils/config.ts delete mode 100644 packages/metacoin/test/utils/coverage.ts delete mode 100644 packages/metacoin/test/utils/profiler.ts delete mode 100644 packages/metacoin/test/utils/web3_wrapper.ts delete mode 100644 packages/metacoin/tsconfig.json delete mode 100644 packages/metacoin/tslint.json delete mode 100644 packages/migrations/.gitignore delete mode 100644 packages/migrations/CHANGELOG.json delete mode 100644 packages/migrations/CHANGELOG.md delete mode 100644 packages/migrations/Dockerfile delete mode 100644 packages/migrations/README.md delete mode 100755 packages/migrations/bin/0x-migrate.js delete mode 100644 packages/migrations/package.json delete mode 100644 packages/migrations/src/cli.ts delete mode 100644 packages/migrations/src/index.ts delete mode 100644 packages/migrations/src/migrate.ts delete mode 100644 packages/migrations/src/migrate_snapshot.ts delete mode 100644 packages/migrations/src/migration.ts delete mode 100644 packages/migrations/src/types.ts delete mode 100644 packages/migrations/src/utils/constants.ts delete mode 100644 packages/migrations/src/utils/provider_factory.ts delete mode 100644 packages/migrations/src/utils/token_info.ts delete mode 100644 packages/migrations/tsconfig.json delete mode 100644 packages/migrations/tslint.json delete mode 100644 packages/migrations/typedoc-tsconfig.json delete mode 100644 packages/order-utils/.npmignore delete mode 100644 packages/order-utils/CHANGELOG.json delete mode 100644 packages/order-utils/CHANGELOG.md delete mode 100644 packages/order-utils/README.md delete mode 100644 packages/order-utils/coverage/.gitkeep delete mode 100644 packages/order-utils/package.json delete mode 100644 packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts delete mode 100644 packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts delete mode 100644 packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts delete mode 100644 packages/order-utils/src/abstract/abstract_order_filled_cancelled_lazy_store.ts delete mode 100644 packages/order-utils/src/assert.ts delete mode 100644 packages/order-utils/src/asset_data_utils.ts delete mode 100644 packages/order-utils/src/constants.ts delete mode 100644 packages/order-utils/src/crypto.ts delete mode 100644 packages/order-utils/src/eip712_utils.ts delete mode 100644 packages/order-utils/src/exchange_transfer_simulator.ts delete mode 100644 packages/order-utils/src/index.ts delete mode 100644 packages/order-utils/src/market_utils.ts delete mode 100644 packages/order-utils/src/order_factory.ts delete mode 100644 packages/order-utils/src/order_hash.ts delete mode 100644 packages/order-utils/src/order_state_utils.ts delete mode 100644 packages/order-utils/src/order_validation_utils.ts delete mode 100644 packages/order-utils/src/parsing_utils.ts delete mode 100644 packages/order-utils/src/rate_utils.ts delete mode 100644 packages/order-utils/src/remaining_fillable_calculator.ts delete mode 100644 packages/order-utils/src/salt.ts delete mode 100644 packages/order-utils/src/signature_utils.ts delete mode 100644 packages/order-utils/src/sorting_utils.ts delete mode 100644 packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts delete mode 100644 packages/order-utils/src/store/order_filled_cancelled_lazy_store.ts delete mode 100644 packages/order-utils/src/types.ts delete mode 100644 packages/order-utils/src/utils.ts delete mode 100644 packages/order-utils/test/assert_test.ts delete mode 100644 packages/order-utils/test/asset_data_utils_test.ts delete mode 100644 packages/order-utils/test/eip712_utils_test.ts delete mode 100644 packages/order-utils/test/exchange_transfer_simulator_test.ts delete mode 100644 packages/order-utils/test/market_utils_test.ts delete mode 100644 packages/order-utils/test/order_hash_test.ts delete mode 100644 packages/order-utils/test/order_state_utils_test.ts delete mode 100644 packages/order-utils/test/order_validation_utils_test.ts delete mode 100644 packages/order-utils/test/rate_utils_test.ts delete mode 100644 packages/order-utils/test/remaining_fillable_calculator_test.ts delete mode 100644 packages/order-utils/test/signature_utils_test.ts delete mode 100644 packages/order-utils/test/sorting_utils_test.ts delete mode 100644 packages/order-utils/test/utils/chai_setup.ts delete mode 100644 packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts delete mode 100644 packages/order-utils/test/utils/test_order_factory.ts delete mode 100644 packages/order-utils/test/utils/web3_wrapper.ts delete mode 100644 packages/order-utils/tsconfig.json delete mode 100644 packages/order-utils/tslint.json delete mode 100644 packages/order-utils/typedoc-tsconfig.json delete mode 100644 packages/order-watcher/.npmignore delete mode 100644 packages/order-watcher/CHANGELOG.json delete mode 100644 packages/order-watcher/CHANGELOG.md delete mode 100644 packages/order-watcher/Dockerfile delete mode 100644 packages/order-watcher/README.md delete mode 100644 packages/order-watcher/coverage/.gitkeep delete mode 100644 packages/order-watcher/package.json delete mode 100644 packages/order-watcher/src/index.ts delete mode 100644 packages/order-watcher/src/order_watcher/collision_resistant_abi_decoder.ts delete mode 100644 packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts delete mode 100644 packages/order-watcher/src/order_watcher/event_watcher.ts delete mode 100644 packages/order-watcher/src/order_watcher/expiration_watcher.ts delete mode 100644 packages/order-watcher/src/order_watcher/order_watcher.ts delete mode 100644 packages/order-watcher/src/order_watcher/order_watcher_web_socket_server.ts delete mode 100644 packages/order-watcher/src/schemas/order_watcher_partial_config_schema.ts delete mode 100644 packages/order-watcher/src/server.ts delete mode 100644 packages/order-watcher/src/types.ts delete mode 100644 packages/order-watcher/src/utils/assert.ts delete mode 100644 packages/order-watcher/src/utils/utils.ts delete mode 100644 packages/order-watcher/test/expiration_watcher_test.ts delete mode 100644 packages/order-watcher/test/global_hooks.ts delete mode 100644 packages/order-watcher/test/order_watcher_test.ts delete mode 100644 packages/order-watcher/test/order_watcher_web_socket_server_test.ts delete mode 100644 packages/order-watcher/test/utils/chai_setup.ts delete mode 100644 packages/order-watcher/test/utils/constants.ts delete mode 100644 packages/order-watcher/test/utils/migrate.ts delete mode 100644 packages/order-watcher/test/utils/web3_wrapper.ts delete mode 100644 packages/order-watcher/tsconfig.json delete mode 100644 packages/order-watcher/tslint.json delete mode 100644 packages/order-watcher/typedoc-tsconfig.json delete mode 100644 packages/pipeline/.npmignore delete mode 100644 packages/pipeline/README.md delete mode 100644 packages/pipeline/coverage/.gitkeep delete mode 100644 packages/pipeline/migrations/1542070840010-InitialSchema.ts delete mode 100644 packages/pipeline/migrations/1542147915364-NewSraOrderTimestampFormat.ts delete mode 100644 packages/pipeline/migrations/1542152278484-RenameSraOrdersFilledAmounts.ts delete mode 100644 packages/pipeline/migrations/1542234704666-ConvertBigNumberToNumeric.ts delete mode 100644 packages/pipeline/migrations/1542249766882-AddHomepageUrlToRelayers.ts delete mode 100644 packages/pipeline/migrations/1542401122477-MakeTakerAddressNullable.ts delete mode 100644 packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts delete mode 100644 packages/pipeline/migrations/1543434472116-TokenOrderbookSnapshots.ts delete mode 100644 packages/pipeline/migrations/1543446690436-CreateDexTrades.ts delete mode 100644 packages/pipeline/migrations/1543980079179-ConvertTokenMetadataDecimalsToBigNumber.ts delete mode 100644 packages/pipeline/migrations/1543983324954-ConvertTransactionGasPriceToBigNumber.ts delete mode 100644 packages/pipeline/migrations/1544131464368-CreateERC20ApprovalEvents.ts delete mode 100644 packages/pipeline/migrations/1544131658904-TokenOrderbookSnapshotAddOrderType.ts delete mode 100644 packages/pipeline/migrations/1545440485644-CreateCopperTables.ts delete mode 100644 packages/pipeline/migrations/1547153875669-UpdateDDexAPIToV3.ts delete mode 100644 packages/pipeline/package.json delete mode 100644 packages/pipeline/src/data_sources/bloxy/index.ts delete mode 100644 packages/pipeline/src/data_sources/contract-wrappers/erc20_events.ts delete mode 100644 packages/pipeline/src/data_sources/contract-wrappers/exchange_events.ts delete mode 100644 packages/pipeline/src/data_sources/contract-wrappers/utils.ts delete mode 100644 packages/pipeline/src/data_sources/copper/index.ts delete mode 100644 packages/pipeline/src/data_sources/ddex/index.ts delete mode 100644 packages/pipeline/src/data_sources/idex/index.ts delete mode 100644 packages/pipeline/src/data_sources/oasis/index.ts delete mode 100644 packages/pipeline/src/data_sources/ohlcv_external/crypto_compare.ts delete mode 100644 packages/pipeline/src/data_sources/paradex/index.ts delete mode 100644 packages/pipeline/src/data_sources/relayer-registry/index.ts delete mode 100644 packages/pipeline/src/data_sources/trusted_tokens/index.ts delete mode 100644 packages/pipeline/src/data_sources/web3/index.ts delete mode 100644 packages/pipeline/src/entities/block.ts delete mode 100644 packages/pipeline/src/entities/copper_activity.ts delete mode 100644 packages/pipeline/src/entities/copper_activity_type.ts delete mode 100644 packages/pipeline/src/entities/copper_custom_field.ts delete mode 100644 packages/pipeline/src/entities/copper_lead.ts delete mode 100644 packages/pipeline/src/entities/copper_opportunity.ts delete mode 100644 packages/pipeline/src/entities/dex_trade.ts delete mode 100644 packages/pipeline/src/entities/erc20_approval_event.ts delete mode 100644 packages/pipeline/src/entities/exchange_cancel_event.ts delete mode 100644 packages/pipeline/src/entities/exchange_cancel_up_to_event.ts delete mode 100644 packages/pipeline/src/entities/exchange_fill_event.ts delete mode 100644 packages/pipeline/src/entities/index.ts delete mode 100644 packages/pipeline/src/entities/ohlcv_external.ts delete mode 100644 packages/pipeline/src/entities/relayer.ts delete mode 100644 packages/pipeline/src/entities/sra_order.ts delete mode 100644 packages/pipeline/src/entities/sra_order_observed_timestamp.ts delete mode 100644 packages/pipeline/src/entities/token_metadata.ts delete mode 100644 packages/pipeline/src/entities/token_order.ts delete mode 100644 packages/pipeline/src/entities/transaction.ts delete mode 100644 packages/pipeline/src/ormconfig.ts delete mode 100644 packages/pipeline/src/parsers/bloxy/index.ts delete mode 100644 packages/pipeline/src/parsers/copper/index.ts delete mode 100644 packages/pipeline/src/parsers/ddex_orders/index.ts delete mode 100644 packages/pipeline/src/parsers/events/erc20_events.ts delete mode 100644 packages/pipeline/src/parsers/events/exchange_events.ts delete mode 100644 packages/pipeline/src/parsers/events/index.ts delete mode 100644 packages/pipeline/src/parsers/idex_orders/index.ts delete mode 100644 packages/pipeline/src/parsers/oasis_orders/index.ts delete mode 100644 packages/pipeline/src/parsers/ohlcv_external/crypto_compare.ts delete mode 100644 packages/pipeline/src/parsers/paradex_orders/index.ts delete mode 100644 packages/pipeline/src/parsers/relayer_registry/index.ts delete mode 100644 packages/pipeline/src/parsers/sra_orders/index.ts delete mode 100644 packages/pipeline/src/parsers/token_metadata/index.ts delete mode 100644 packages/pipeline/src/parsers/utils.ts delete mode 100644 packages/pipeline/src/parsers/web3/index.ts delete mode 100644 packages/pipeline/src/scripts/pull_competing_dex_trades.ts delete mode 100644 packages/pipeline/src/scripts/pull_copper.ts delete mode 100644 packages/pipeline/src/scripts/pull_ddex_orderbook_snapshots.ts delete mode 100644 packages/pipeline/src/scripts/pull_erc20_events.ts delete mode 100644 packages/pipeline/src/scripts/pull_exchange_events.ts delete mode 100644 packages/pipeline/src/scripts/pull_idex_orderbook_snapshots.ts delete mode 100644 packages/pipeline/src/scripts/pull_missing_blocks.ts delete mode 100644 packages/pipeline/src/scripts/pull_oasis_orderbook_snapshots.ts delete mode 100644 packages/pipeline/src/scripts/pull_ohlcv_cryptocompare.ts delete mode 100644 packages/pipeline/src/scripts/pull_paradex_orderbook_snapshots.ts delete mode 100644 packages/pipeline/src/scripts/pull_radar_relay_orders.ts delete mode 100644 packages/pipeline/src/scripts/pull_trusted_tokens.ts delete mode 100644 packages/pipeline/src/scripts/update_relayer_info.ts delete mode 100644 packages/pipeline/src/types.ts delete mode 100644 packages/pipeline/src/utils/constants.ts delete mode 100644 packages/pipeline/src/utils/get_ohlcv_trading_pairs.ts delete mode 100644 packages/pipeline/src/utils/index.ts delete mode 100644 packages/pipeline/src/utils/transformers/asset_proxy_id_types.ts delete mode 100644 packages/pipeline/src/utils/transformers/big_number.ts delete mode 100644 packages/pipeline/src/utils/transformers/index.ts delete mode 100644 packages/pipeline/src/utils/transformers/number_to_bigint.ts delete mode 100644 packages/pipeline/test/data_sources/contract-wrappers/utils_test.ts delete mode 100644 packages/pipeline/test/data_sources/ohlcv_external/crypto_compare_test.ts delete mode 100644 packages/pipeline/test/db_global_hooks.ts delete mode 100644 packages/pipeline/test/db_setup.ts delete mode 100644 packages/pipeline/test/entities/block_test.ts delete mode 100644 packages/pipeline/test/entities/copper_test.ts delete mode 100644 packages/pipeline/test/entities/dex_trades_test.ts delete mode 100644 packages/pipeline/test/entities/erc20_approval_events_test.ts delete mode 100644 packages/pipeline/test/entities/exchange_cancel_event_test.ts delete mode 100644 packages/pipeline/test/entities/exchange_cancel_up_to_event_test.ts delete mode 100644 packages/pipeline/test/entities/exchange_fill_event_test.ts delete mode 100644 packages/pipeline/test/entities/ohlcv_external_test.ts delete mode 100644 packages/pipeline/test/entities/relayer_test.ts delete mode 100644 packages/pipeline/test/entities/sra_order_test.ts delete mode 100644 packages/pipeline/test/entities/token_metadata_test.ts delete mode 100644 packages/pipeline/test/entities/token_order_test.ts delete mode 100644 packages/pipeline/test/entities/transaction_test.ts delete mode 100644 packages/pipeline/test/entities/util.ts delete mode 100644 packages/pipeline/test/fixtures/copper/api_v1_activity_types.json delete mode 100644 packages/pipeline/test/fixtures/copper/api_v1_activity_types.ts delete mode 100644 packages/pipeline/test/fixtures/copper/api_v1_custom_field_definitions.json delete mode 100644 packages/pipeline/test/fixtures/copper/api_v1_custom_field_definitions.ts delete mode 100644 packages/pipeline/test/fixtures/copper/api_v1_list_activities.json delete mode 100644 packages/pipeline/test/fixtures/copper/api_v1_list_activities.ts delete mode 100644 packages/pipeline/test/fixtures/copper/api_v1_list_leads.json delete mode 100644 packages/pipeline/test/fixtures/copper/api_v1_list_leads.ts delete mode 100644 packages/pipeline/test/fixtures/copper/api_v1_list_opportunities.json delete mode 100644 packages/pipeline/test/fixtures/copper/api_v1_list_opportunities.ts delete mode 100644 packages/pipeline/test/fixtures/copper/parsed_entities.ts delete mode 100644 packages/pipeline/test/parsers/bloxy/index_test.ts delete mode 100644 packages/pipeline/test/parsers/copper/index_test.ts delete mode 100644 packages/pipeline/test/parsers/ddex_orders/index_test.ts delete mode 100644 packages/pipeline/test/parsers/events/erc20_events_test.ts delete mode 100644 packages/pipeline/test/parsers/events/exchange_events_test.ts delete mode 100644 packages/pipeline/test/parsers/idex_orders/index_test.ts delete mode 100644 packages/pipeline/test/parsers/oasis_orders/index_test.ts delete mode 100644 packages/pipeline/test/parsers/ohlcv_external/crypto_compare_test.ts delete mode 100644 packages/pipeline/test/parsers/paradex_orders/index_test.ts delete mode 100644 packages/pipeline/test/parsers/sra_orders/index_test.ts delete mode 100644 packages/pipeline/test/parsers/utils/index_test.ts delete mode 100644 packages/pipeline/test/utils/chai_setup.ts delete mode 100644 packages/pipeline/tsconfig.json delete mode 100644 packages/pipeline/tslint.json delete mode 100644 packages/pipeline/typedoc-tsconfig.json delete mode 100644 packages/react-docs/.npmignore delete mode 100644 packages/react-docs/CHANGELOG.json delete mode 100644 packages/react-docs/CHANGELOG.md delete mode 100644 packages/react-docs/README.md delete mode 100644 packages/react-docs/package.json delete mode 100644 packages/react-docs/src/components/badge.tsx delete mode 100644 packages/react-docs/src/components/comment.tsx delete mode 100644 packages/react-docs/src/components/custom_enum.tsx delete mode 100644 packages/react-docs/src/components/doc_reference.tsx delete mode 100644 packages/react-docs/src/components/enum.tsx delete mode 100644 packages/react-docs/src/components/event_definition.tsx delete mode 100644 packages/react-docs/src/components/interface.tsx delete mode 100644 packages/react-docs/src/components/property_block.tsx delete mode 100644 packages/react-docs/src/components/signature.tsx delete mode 100644 packages/react-docs/src/components/signature_block.tsx delete mode 100644 packages/react-docs/src/components/source_link.tsx delete mode 100644 packages/react-docs/src/components/type.tsx delete mode 100644 packages/react-docs/src/components/type_definition.tsx delete mode 100644 packages/react-docs/src/docs_info.ts delete mode 100644 packages/react-docs/src/globals.d.ts delete mode 100644 packages/react-docs/src/index.ts delete mode 100644 packages/react-docs/src/types.ts delete mode 100644 packages/react-docs/src/utils/constants.ts delete mode 100644 packages/react-docs/src/utils/typedoc_utils.ts delete mode 100644 packages/react-docs/tsconfig.json delete mode 100644 packages/react-docs/tslint.json delete mode 100644 packages/react-shared/.npmignore delete mode 100644 packages/react-shared/CHANGELOG.json delete mode 100644 packages/react-shared/CHANGELOG.md delete mode 100644 packages/react-shared/README.md delete mode 100644 packages/react-shared/package.json delete mode 100644 packages/react-shared/src/components/anchor_title.tsx delete mode 100644 packages/react-shared/src/components/link.tsx delete mode 100644 packages/react-shared/src/components/markdown_code_block.tsx delete mode 100644 packages/react-shared/src/components/markdown_link_block.tsx delete mode 100644 packages/react-shared/src/components/markdown_paragraph_block.tsx delete mode 100644 packages/react-shared/src/components/markdown_section.tsx delete mode 100644 packages/react-shared/src/components/section_header.tsx delete mode 100644 packages/react-shared/src/globals.d.ts delete mode 100644 packages/react-shared/src/index.ts delete mode 100644 packages/react-shared/src/types.ts delete mode 100644 packages/react-shared/src/utils/colors.ts delete mode 100644 packages/react-shared/src/utils/constants.ts delete mode 100644 packages/react-shared/src/utils/utils.ts delete mode 100644 packages/react-shared/tsconfig.json delete mode 100644 packages/react-shared/tslint.json delete mode 100644 packages/sol-resolver/CHANGELOG.json delete mode 100644 packages/sol-resolver/CHANGELOG.md delete mode 100644 packages/sol-resolver/README.md delete mode 100644 packages/sol-resolver/package.json delete mode 100644 packages/sol-resolver/src/globals.d.ts delete mode 100644 packages/sol-resolver/src/index.ts delete mode 100644 packages/sol-resolver/src/resolvers/enumerable_resolver.ts delete mode 100644 packages/sol-resolver/src/resolvers/fallthrough_resolver.ts delete mode 100644 packages/sol-resolver/src/resolvers/fs_resolver.ts delete mode 100644 packages/sol-resolver/src/resolvers/name_resolver.ts delete mode 100644 packages/sol-resolver/src/resolvers/npm_resolver.ts delete mode 100644 packages/sol-resolver/src/resolvers/relative_fs_resolver.ts delete mode 100644 packages/sol-resolver/src/resolvers/resolver.ts delete mode 100644 packages/sol-resolver/src/resolvers/spy_resolver.ts delete mode 100644 packages/sol-resolver/src/resolvers/url_resolver.ts delete mode 100644 packages/sol-resolver/src/types.ts delete mode 100644 packages/sol-resolver/tsconfig.json delete mode 100644 packages/sol-resolver/tslint.json delete mode 100644 packages/sra-spec/.discharge.json delete mode 100644 packages/sra-spec/.gitignore delete mode 100644 packages/sra-spec/.npmignore delete mode 100644 packages/sra-spec/CHANGELOG.json delete mode 100644 packages/sra-spec/CHANGELOG.md delete mode 100644 packages/sra-spec/README.md delete mode 100644 packages/sra-spec/build_scripts/buildJson.ts delete mode 100644 packages/sra-spec/package.json delete mode 100644 packages/sra-spec/public/index.html delete mode 100644 packages/sra-spec/src/api.ts delete mode 100644 packages/sra-spec/src/errors.ts delete mode 100644 packages/sra-spec/src/examples/errors.ts delete mode 100644 packages/sra-spec/src/examples/index.ts delete mode 100644 packages/sra-spec/src/examples/relayerApiAssetDataPairsResponse.ts delete mode 100644 packages/sra-spec/src/examples/relayerApiFeeRecipientsResponse.ts delete mode 100644 packages/sra-spec/src/examples/relayerApiOrder.ts delete mode 100644 packages/sra-spec/src/examples/relayerApiOrderConfigPayload.ts delete mode 100644 packages/sra-spec/src/examples/relayerApiOrderConfigResponse.ts delete mode 100644 packages/sra-spec/src/examples/relayerApiOrderbookResponse.ts delete mode 100644 packages/sra-spec/src/examples/relayerApiOrdersResponse.ts delete mode 100644 packages/sra-spec/src/examples/signedOrder.ts delete mode 100644 packages/sra-spec/src/headers.ts delete mode 100644 packages/sra-spec/src/index.ts delete mode 100644 packages/sra-spec/src/json-schemas.ts delete mode 100644 packages/sra-spec/src/md/index.ts delete mode 100644 packages/sra-spec/src/md/introduction.md delete mode 100644 packages/sra-spec/src/parameters.ts delete mode 100644 packages/sra-spec/src/responses.ts delete mode 100644 packages/sra-spec/tsconfig.json delete mode 100644 packages/sra-spec/tslint.json delete mode 100644 packages/testnet-faucets/Dockerfile delete mode 100644 packages/testnet-faucets/README.md delete mode 100644 packages/testnet-faucets/gulpfile.js delete mode 100644 packages/testnet-faucets/package.json delete mode 100644 packages/testnet-faucets/src/ts/configs.ts delete mode 100644 packages/testnet-faucets/src/ts/constants.ts delete mode 100644 packages/testnet-faucets/src/ts/dispatch_queue.ts delete mode 100644 packages/testnet-faucets/src/ts/dispense_asset_tasks.ts delete mode 100644 packages/testnet-faucets/src/ts/error_reporter.ts delete mode 100644 packages/testnet-faucets/src/ts/global.d.ts delete mode 100644 packages/testnet-faucets/src/ts/handler.ts delete mode 100644 packages/testnet-faucets/src/ts/parameter_transformer.ts delete mode 100644 packages/testnet-faucets/src/ts/rpc_urls.ts delete mode 100644 packages/testnet-faucets/src/ts/server.ts delete mode 100644 packages/testnet-faucets/src/ts/tokens.ts delete mode 100644 packages/testnet-faucets/tsconfig.json delete mode 100644 packages/testnet-faucets/tslint.json delete mode 100644 packages/tslint-config/.npmignore delete mode 100644 packages/tslint-config/CHANGELOG.json delete mode 100644 packages/tslint-config/CHANGELOG.md delete mode 100644 packages/tslint-config/README.md delete mode 100644 packages/tslint-config/package.json delete mode 100644 packages/tslint-config/rules/asyncSuffixRule.ts delete mode 100644 packages/tslint-config/rules/booleanNamingRule.ts delete mode 100644 packages/tslint-config/rules/customNoMagicNumbersRule.ts delete mode 100644 packages/tslint-config/rules/enumNamingRule.ts delete mode 100644 packages/tslint-config/rules/underscorePrivateAndProtectedRule.ts delete mode 100644 packages/tslint-config/rules/walkers/async_suffix.ts delete mode 100644 packages/tslint-config/test/enumNamingSpec.spec.ts delete mode 100644 packages/tslint-config/test/lintrunner.ts delete mode 100644 packages/tslint-config/tsconfig.json delete mode 100644 packages/tslint-config/tslint.json delete mode 100644 packages/types/.npmignore delete mode 100644 packages/types/CHANGELOG.json delete mode 100644 packages/types/CHANGELOG.md delete mode 100644 packages/types/README.md delete mode 100644 packages/types/package.json delete mode 100644 packages/types/src/globals.d.ts delete mode 100644 packages/types/src/index.ts delete mode 100644 packages/types/tsconfig.json delete mode 100644 packages/types/tslint.json delete mode 100644 packages/typescript-typings/types/@ledgerhq/index.d.ts delete mode 100644 packages/typescript-typings/types/async-child-process/index.d.ts delete mode 100644 packages/typescript-typings/types/chai-as-promised/index.d.ts delete mode 100644 packages/typescript-typings/types/chai-bignumber/index.d.ts delete mode 100644 packages/typescript-typings/types/chai/index.d.ts delete mode 100644 packages/typescript-typings/types/dirty-chai/index.d.ts create mode 100644 packages/typescript-typings/types/dsolc/index.d.ts delete mode 100644 packages/typescript-typings/types/es6-promisify/index.d.ts delete mode 100644 packages/typescript-typings/types/ethereumjs-abi/index.d.ts delete mode 100644 packages/typescript-typings/types/ethereumjs-util/index.d.ts create mode 100644 packages/typescript-typings/types/ganache-core/index.d.ts delete mode 100644 packages/typescript-typings/types/json-rpc-error/index.d.ts delete mode 100644 packages/typescript-typings/types/keccak/index.d.ts delete mode 100644 packages/typescript-typings/types/openapi-schema-validation/index.d.ts delete mode 100644 packages/typescript-typings/types/promisify-child-process/index.d.ts delete mode 100644 packages/typescript-typings/types/publish-release/index.d.ts delete mode 100644 packages/typescript-typings/types/react-highlight/index.d.ts delete mode 100644 packages/typescript-typings/types/react-popper/index.d.ts delete mode 100644 packages/typescript-typings/types/react-tooltip/index.d.ts delete mode 100644 packages/typescript-typings/types/react-typist/index.d.ts delete mode 100644 packages/typescript-typings/types/request-promise-native/index.d.ts delete mode 100644 packages/typescript-typings/types/rollbar/index.d.ts delete mode 100644 packages/typescript-typings/types/semver-diff/index.d.ts delete mode 100644 packages/typescript-typings/types/semver-sort/index.d.ts delete mode 100644 packages/typescript-typings/types/solc/index.d.ts delete mode 100644 packages/typescript-typings/types/to-snake-case/index.d.ts delete mode 100644 packages/typescript-typings/types/truffle-hdwalet-provider/index.d.ts delete mode 100644 packages/typescript-typings/types/web3-eth-abi/index.d.ts delete mode 100644 packages/typescript-typings/types/web3/index.d.ts delete mode 100644 packages/utils/.npmignore delete mode 100644 packages/utils/CHANGELOG.json delete mode 100644 packages/utils/CHANGELOG.md delete mode 100644 packages/utils/README.md delete mode 100644 packages/utils/coverage/.gitkeep delete mode 100644 packages/utils/package.json delete mode 100644 packages/utils/src/abi_decoder.ts delete mode 100644 packages/utils/src/abi_encoder/abstract_data_types/data_type.ts delete mode 100644 packages/utils/src/abi_encoder/abstract_data_types/interfaces.ts delete mode 100644 packages/utils/src/abi_encoder/abstract_data_types/types/blob.ts delete mode 100644 packages/utils/src/abi_encoder/abstract_data_types/types/pointer.ts delete mode 100644 packages/utils/src/abi_encoder/abstract_data_types/types/set.ts delete mode 100644 packages/utils/src/abi_encoder/calldata/blocks/blob.ts delete mode 100644 packages/utils/src/abi_encoder/calldata/blocks/pointer.ts delete mode 100644 packages/utils/src/abi_encoder/calldata/blocks/set.ts delete mode 100644 packages/utils/src/abi_encoder/calldata/calldata.ts delete mode 100644 packages/utils/src/abi_encoder/calldata/calldata_block.ts delete mode 100644 packages/utils/src/abi_encoder/calldata/iterator.ts delete mode 100644 packages/utils/src/abi_encoder/calldata/raw_calldata.ts delete mode 100644 packages/utils/src/abi_encoder/evm_data_type_factory.ts delete mode 100644 packages/utils/src/abi_encoder/evm_data_types/address.ts delete mode 100644 packages/utils/src/abi_encoder/evm_data_types/array.ts delete mode 100644 packages/utils/src/abi_encoder/evm_data_types/bool.ts delete mode 100644 packages/utils/src/abi_encoder/evm_data_types/dynamic_bytes.ts delete mode 100644 packages/utils/src/abi_encoder/evm_data_types/int.ts delete mode 100644 packages/utils/src/abi_encoder/evm_data_types/method.ts delete mode 100644 packages/utils/src/abi_encoder/evm_data_types/pointer.ts delete mode 100644 packages/utils/src/abi_encoder/evm_data_types/static_bytes.ts delete mode 100644 packages/utils/src/abi_encoder/evm_data_types/string.ts delete mode 100644 packages/utils/src/abi_encoder/evm_data_types/tuple.ts delete mode 100644 packages/utils/src/abi_encoder/evm_data_types/uint.ts delete mode 100644 packages/utils/src/abi_encoder/index.ts delete mode 100644 packages/utils/src/abi_encoder/utils/constants.ts delete mode 100644 packages/utils/src/abi_encoder/utils/math.ts delete mode 100644 packages/utils/src/abi_encoder/utils/queue.ts delete mode 100644 packages/utils/src/abi_encoder/utils/rules.ts delete mode 100644 packages/utils/src/abi_encoder/utils/signature_parser.ts delete mode 100644 packages/utils/src/abi_utils.ts delete mode 100644 packages/utils/src/address_utils.ts delete mode 100644 packages/utils/src/class_utils.ts delete mode 100644 packages/utils/src/configured_bignumber.ts delete mode 100644 packages/utils/src/constants.ts delete mode 100644 packages/utils/src/error_utils.ts delete mode 100644 packages/utils/src/fetch_async.ts delete mode 100644 packages/utils/src/globals.d.ts delete mode 100644 packages/utils/src/index.ts delete mode 100644 packages/utils/src/interval_utils.ts delete mode 100644 packages/utils/src/log_utils.ts delete mode 100644 packages/utils/src/promisify.ts delete mode 100644 packages/utils/src/sign_typed_data_utils.ts delete mode 100644 packages/utils/test/abi_encoder/abi_samples/method_abis.ts delete mode 100644 packages/utils/test/abi_encoder/abi_samples/optimizer_abis.ts delete mode 100644 packages/utils/test/abi_encoder/abi_samples/return_value_abis.ts delete mode 100644 packages/utils/test/abi_encoder/evm_data_types_test.ts delete mode 100644 packages/utils/test/abi_encoder/methods_test.ts delete mode 100644 packages/utils/test/abi_encoder/optimizer_test.ts delete mode 100644 packages/utils/test/abi_encoder/return_values_test.ts delete mode 100644 packages/utils/test/abi_encoder/signature_tests.ts delete mode 100644 packages/utils/test/abi_utils_test.ts delete mode 100644 packages/utils/test/sign_typed_data_utils_test.ts delete mode 100644 packages/utils/test/utils/chai_setup.ts delete mode 100644 packages/utils/tsconfig.json delete mode 100644 packages/utils/tslint.json delete mode 100644 packages/verdaccio/Dockerfile delete mode 100644 packages/verdaccio/README.md delete mode 100644 packages/verdaccio/conf.yaml delete mode 100644 packages/web3-wrapper/.npmignore delete mode 100644 packages/web3-wrapper/CHANGELOG.json delete mode 100644 packages/web3-wrapper/CHANGELOG.md delete mode 100644 packages/web3-wrapper/README.md delete mode 100644 packages/web3-wrapper/coverage/.gitkeep delete mode 100644 packages/web3-wrapper/package.json delete mode 100644 packages/web3-wrapper/src/globals.d.ts delete mode 100644 packages/web3-wrapper/src/index.ts delete mode 100644 packages/web3-wrapper/src/marshaller.ts delete mode 100644 packages/web3-wrapper/src/types.ts delete mode 100644 packages/web3-wrapper/src/utils.ts delete mode 100644 packages/web3-wrapper/src/web3_wrapper.ts delete mode 100644 packages/web3-wrapper/test/utils/chai_setup.ts delete mode 100644 packages/web3-wrapper/test/web3_wrapper_test.ts delete mode 100644 packages/web3-wrapper/tsconfig.json delete mode 100644 packages/web3-wrapper/tslint.json delete mode 100644 packages/web3-wrapper/typedoc-tsconfig.json delete mode 100644 packages/website/.gitignore delete mode 100644 packages/website/README.md delete mode 100644 packages/website/contracts/Mintable.json delete mode 100644 packages/website/less/all.less delete mode 100644 packages/website/less/normalize.less delete mode 100644 packages/website/md/docs/0xjs/0.0.1/async.md delete mode 100644 packages/website/md/docs/0xjs/0.0.1/errors.md delete mode 100644 packages/website/md/docs/0xjs/0.0.1/installation.md delete mode 100644 packages/website/md/docs/0xjs/0.0.1/introduction.md delete mode 100644 packages/website/md/docs/0xjs/0.0.1/versioning.md delete mode 100644 packages/website/md/docs/0xjs/1.0.1/async.md delete mode 100644 packages/website/md/docs/0xjs/1.0.1/installation.md delete mode 100644 packages/website/md/docs/0xjs/1.0.1/introduction.md delete mode 100644 packages/website/md/docs/0xjs/1.0.1/versioning.md delete mode 100644 packages/website/md/docs/0xjs/2.0.0/async.md delete mode 100644 packages/website/md/docs/0xjs/2.0.0/installation.md delete mode 100644 packages/website/md/docs/asset_buyer/installation.md delete mode 100644 packages/website/md/docs/asset_buyer/introduction.md delete mode 100644 packages/website/md/docs/asset_buyer/usage.md delete mode 100644 packages/website/md/docs/connect/1/installation.md delete mode 100644 packages/website/md/docs/connect/1/introduction.md delete mode 100644 packages/website/md/docs/connect/2/introduction.md delete mode 100644 packages/website/md/docs/connect/3/installation.md delete mode 100644 packages/website/md/docs/contract_wrappers/1/installation.md delete mode 100644 packages/website/md/docs/contract_wrappers/1/introduction.md delete mode 100644 packages/website/md/docs/contract_wrappers/2/installation.md delete mode 100644 packages/website/md/docs/ethereum_types/installation.md delete mode 100644 packages/website/md/docs/ethereum_types/introduction.md delete mode 100644 packages/website/md/docs/json_schemas/1/installation.md delete mode 100644 packages/website/md/docs/json_schemas/1/introduction.md delete mode 100644 packages/website/md/docs/json_schemas/1/schemas.md delete mode 100644 packages/website/md/docs/json_schemas/1/usage.md delete mode 100644 packages/website/md/docs/json_schemas/2/schemas.md delete mode 100644 packages/website/md/docs/json_schemas/3/installation.md delete mode 100644 packages/website/md/docs/json_schemas/3/introduction.md delete mode 100644 packages/website/md/docs/json_schemas/3/schemas.md delete mode 100644 packages/website/md/docs/json_schemas/3/usage.md delete mode 100644 packages/website/md/docs/migrations/1/installation.md delete mode 100644 packages/website/md/docs/migrations/1/introduction.md delete mode 100644 packages/website/md/docs/order_utils/1/installation.md delete mode 100644 packages/website/md/docs/order_utils/1/introduction.md delete mode 100644 packages/website/md/docs/order_utils/2/installation.md delete mode 100644 packages/website/md/docs/order_utils/2/introduction.md delete mode 100644 packages/website/md/docs/order_watcher/1/installation.md delete mode 100644 packages/website/md/docs/order_watcher/1/introduction.md delete mode 100644 packages/website/md/docs/order_watcher/2/installation.md delete mode 100644 packages/website/md/docs/order_watcher/2/introduction.md delete mode 100644 packages/website/md/docs/smart_contracts/1/introduction.md delete mode 100644 packages/website/md/docs/smart_contracts/2/introduction.md delete mode 100644 packages/website/md/docs/sol-compiler/1/installation.md delete mode 100644 packages/website/md/docs/sol-compiler/1/introduction.md delete mode 100644 packages/website/md/docs/sol-compiler/1/usage.md delete mode 100644 packages/website/md/docs/sol-compiler/2/installation.md delete mode 100644 packages/website/md/docs/sol-compiler/2/usage.md delete mode 100644 packages/website/md/docs/sol_coverage/installation.md delete mode 100644 packages/website/md/docs/sol_coverage/introduction.md delete mode 100644 packages/website/md/docs/sol_coverage/usage.md delete mode 100644 packages/website/md/docs/sol_profiler/installation.md delete mode 100644 packages/website/md/docs/sol_profiler/introduction.md delete mode 100644 packages/website/md/docs/sol_profiler/usage.md delete mode 100644 packages/website/md/docs/sol_trace/installation.md delete mode 100644 packages/website/md/docs/sol_trace/introduction.md delete mode 100644 packages/website/md/docs/sol_trace/usage.md delete mode 100644 packages/website/md/docs/subproviders/1/installation.md delete mode 100644 packages/website/md/docs/subproviders/1/introduction.md delete mode 100644 packages/website/md/docs/subproviders/1/ledger_node_hid.md delete mode 100644 packages/website/md/docs/subproviders/2/installation.md delete mode 100644 packages/website/md/docs/web3_wrapper/1/installation.md delete mode 100644 packages/website/md/docs/web3_wrapper/1/introduction.md delete mode 100644 packages/website/md/docs/web3_wrapper/2/installation.md delete mode 100644 packages/website/package.json delete mode 100644 packages/website/public/css/basscss.min.css delete mode 100644 packages/website/public/css/basscss_responsive_custom.css delete mode 100644 packages/website/public/css/basscss_responsive_margin.css delete mode 100644 packages/website/public/css/basscss_responsive_padding.css delete mode 100644 packages/website/public/css/basscss_responsive_type_scale.css delete mode 100644 packages/website/public/css/formular.css delete mode 100644 packages/website/public/css/github-gist.css delete mode 100755 packages/website/public/css/material-design-iconic-font.min.css delete mode 100644 packages/website/public/css/roboto.css delete mode 100644 packages/website/public/css/roboto_mono.css delete mode 100644 packages/website/public/fonts/Formular-Light.woff delete mode 100644 packages/website/public/fonts/Formular-Light.woff2 delete mode 100644 packages/website/public/fonts/Formular-Regular.woff delete mode 100644 packages/website/public/fonts/Formular-Regular.woff2 delete mode 100755 packages/website/public/fonts/Material-Design-Iconic-Font.eot delete mode 100755 packages/website/public/fonts/Material-Design-Iconic-Font.svg delete mode 100755 packages/website/public/fonts/Material-Design-Iconic-Font.ttf delete mode 100755 packages/website/public/fonts/Material-Design-Iconic-Font.woff delete mode 100755 packages/website/public/fonts/Material-Design-Iconic-Font.woff2 delete mode 100755 packages/website/public/fonts/Roboto-Black.ttf delete mode 100755 packages/website/public/fonts/Roboto-BlackItalic.ttf delete mode 100755 packages/website/public/fonts/Roboto-Bold.ttf delete mode 100755 packages/website/public/fonts/Roboto-BoldItalic.ttf delete mode 100755 packages/website/public/fonts/Roboto-Italic.ttf delete mode 100755 packages/website/public/fonts/Roboto-Light.ttf delete mode 100755 packages/website/public/fonts/Roboto-LightItalic.ttf delete mode 100755 packages/website/public/fonts/Roboto-Medium.ttf delete mode 100755 packages/website/public/fonts/Roboto-MediumItalic.ttf delete mode 100755 packages/website/public/fonts/Roboto-Regular.ttf delete mode 100755 packages/website/public/fonts/Roboto-Thin.ttf delete mode 100755 packages/website/public/fonts/Roboto-ThinItalic.ttf delete mode 100755 packages/website/public/fonts/RobotoMono-Bold.ttf delete mode 100755 packages/website/public/fonts/RobotoMono-BoldItalic.ttf delete mode 100755 packages/website/public/fonts/RobotoMono-Italic.ttf delete mode 100755 packages/website/public/fonts/RobotoMono-Light.ttf delete mode 100755 packages/website/public/fonts/RobotoMono-LightItalic.ttf delete mode 100755 packages/website/public/fonts/RobotoMono-Medium.ttf delete mode 100755 packages/website/public/fonts/RobotoMono-MediumItalic.ttf delete mode 100755 packages/website/public/fonts/RobotoMono-Regular.ttf delete mode 100755 packages/website/public/fonts/RobotoMono-Thin.ttf delete mode 100755 packages/website/public/fonts/RobotoMono-ThinItalic.ttf delete mode 100644 packages/website/public/gifs/genesis.gif delete mode 100644 packages/website/public/images/0x-instant/0x-instant-widgets.png delete mode 100644 packages/website/public/images/0x-instant/0x-instant-widgets@2x.png delete mode 100755 packages/website/public/images/0x-instant/widget-1.png delete mode 100755 packages/website/public/images/0x-instant/widget-2.png delete mode 100755 packages/website/public/images/0x-instant/widget-3.png delete mode 100755 packages/website/public/images/0x-instant/widget-4.png delete mode 100755 packages/website/public/images/0x-instant/widget-5.png delete mode 100755 packages/website/public/images/0x-instant/widget-6.png delete mode 100644 packages/website/public/images/0x_logo.png delete mode 100755 packages/website/public/images/about/about-office.png delete mode 100644 packages/website/public/images/banner/bottomofcta.png delete mode 100644 packages/website/public/images/banner/topofcta.png delete mode 100644 packages/website/public/images/clients/bamboo.svg delete mode 100644 packages/website/public/images/clients/emoon.svg delete mode 100644 packages/website/public/images/clients/ercdex.svg delete mode 100644 packages/website/public/images/clients/godsUnchained.svg delete mode 100644 packages/website/public/images/clients/instex.svg delete mode 100644 packages/website/public/images/clients/laketrade.svg delete mode 100644 packages/website/public/images/clients/ledgerdex.svg delete mode 100644 packages/website/public/images/clients/openrelay.svg delete mode 100644 packages/website/public/images/clients/paradex.svg delete mode 100644 packages/website/public/images/clients/radar-relay.svg delete mode 100644 packages/website/public/images/clients/sharkrelay.svg delete mode 100644 packages/website/public/images/clients/starbitex.svg delete mode 100644 packages/website/public/images/clients/tokenjar.svg delete mode 100644 packages/website/public/images/clients/veil.svg delete mode 100644 packages/website/public/images/coinbase_wallet_logo.png delete mode 100644 packages/website/public/images/developers/logo/0x.svg delete mode 100644 packages/website/public/images/developers/logo/docs.svg delete mode 100644 packages/website/public/images/developers/tutorials/0x_order_basics.svg delete mode 100644 packages/website/public/images/developers/tutorials/build_a_relayer.svg delete mode 100644 packages/website/public/images/developers/tutorials/build_a_trading_bot.svg delete mode 100644 packages/website/public/images/developers/tutorials/develop_on_ethereum.svg delete mode 100644 packages/website/public/images/developers/tutorials/integrate_0x_instant.svg delete mode 100644 packages/website/public/images/developers/tutorials/use_shared_liquidity.svg delete mode 100644 packages/website/public/images/doc_icons/connect.png delete mode 100644 packages/website/public/images/doc_icons/contracts.png delete mode 100644 packages/website/public/images/doc_icons/docs.png delete mode 100644 packages/website/public/images/doc_icons/wiki.png delete mode 100644 packages/website/public/images/doc_icons/zeroExJs.png delete mode 100644 packages/website/public/images/eth_dollar.svg delete mode 100644 packages/website/public/images/eth_token.svg delete mode 100644 packages/website/public/images/eth_token_erc20.svg delete mode 100644 packages/website/public/images/ether.png delete mode 100644 packages/website/public/images/ether_alt.svg delete mode 100644 packages/website/public/images/events/berlin.jpg delete mode 100644 packages/website/public/images/events/event-sample.jpg delete mode 100644 packages/website/public/images/events/london.jpg delete mode 100644 packages/website/public/images/events/sf.jpg delete mode 100755 packages/website/public/images/favicon/favicon-2-16x16.png delete mode 100755 packages/website/public/images/favicon/favicon-2-32x32.png delete mode 100755 packages/website/public/images/favicon/favicon.ico delete mode 100644 packages/website/public/images/jobs/map@2x.png delete mode 100644 packages/website/public/images/landing/0x_chips.png delete mode 100644 packages/website/public/images/landing/0x_homepage.svg delete mode 100644 packages/website/public/images/landing/aragon.png delete mode 100644 packages/website/public/images/landing/augur.png delete mode 100644 packages/website/public/images/landing/currency.png delete mode 100644 packages/website/public/images/landing/dharma.png delete mode 100644 packages/website/public/images/landing/digital_goods.png delete mode 100644 packages/website/public/images/landing/distributed_network.png delete mode 100644 packages/website/public/images/landing/ethfinex.png delete mode 100644 packages/website/public/images/landing/exchange_everywhere.png delete mode 100644 packages/website/public/images/landing/fund_management_icon.png delete mode 100644 packages/website/public/images/landing/gnosis.png delete mode 100644 packages/website/public/images/landing/governance_icon.png delete mode 100644 packages/website/public/images/landing/hero_chip_image.png delete mode 100644 packages/website/public/images/landing/lendroid.png delete mode 100644 packages/website/public/images/landing/liquidity.png delete mode 100644 packages/website/public/images/landing/loans_icon.png delete mode 100644 packages/website/public/images/landing/maker.png delete mode 100644 packages/website/public/images/landing/melonport.png delete mode 100644 packages/website/public/images/landing/open_source.png delete mode 100644 packages/website/public/images/landing/paradex.png delete mode 100644 packages/website/public/images/landing/prediction_market_icon.png delete mode 100644 packages/website/public/images/landing/project_logos/amadeus.png delete mode 100644 packages/website/public/images/landing/project_logos/anx.png delete mode 100644 packages/website/public/images/landing/project_logos/aragon.png delete mode 100644 packages/website/public/images/landing/project_logos/auctus.png delete mode 100644 packages/website/public/images/landing/project_logos/augur.png delete mode 100644 packages/website/public/images/landing/project_logos/blocknet.png delete mode 100644 packages/website/public/images/landing/project_logos/chronobank.png delete mode 100644 packages/website/public/images/landing/project_logos/ddex.png delete mode 100644 packages/website/public/images/landing/project_logos/decent_ex.png delete mode 100644 packages/website/public/images/landing/project_logos/dextroid.png delete mode 100644 packages/website/public/images/landing/project_logos/dharma.png delete mode 100644 packages/website/public/images/landing/project_logos/district0x.png delete mode 100644 packages/website/public/images/landing/project_logos/dydx.png delete mode 100644 packages/website/public/images/landing/project_logos/ercdex.png delete mode 100644 packages/website/public/images/landing/project_logos/ethfinex.png delete mode 100644 packages/website/public/images/landing/project_logos/ethix.png delete mode 100644 packages/website/public/images/landing/project_logos/idt.png delete mode 100644 packages/website/public/images/landing/project_logos/imToken.png delete mode 100644 packages/website/public/images/landing/project_logos/lendroid.png delete mode 100644 packages/website/public/images/landing/project_logos/maker.png delete mode 100644 packages/website/public/images/landing/project_logos/melonport.png delete mode 100644 packages/website/public/images/landing/project_logos/open_relay.png delete mode 100644 packages/website/public/images/landing/project_logos/paradex.png delete mode 100644 packages/website/public/images/landing/project_logos/radar_relay.png delete mode 100644 packages/website/public/images/landing/project_logos/status.png delete mode 100644 packages/website/public/images/landing/project_logos/the_ocean.png delete mode 100644 packages/website/public/images/landing/radar_relay.png delete mode 100644 packages/website/public/images/landing/relayer_diagram.png delete mode 100644 packages/website/public/images/landing/stable_tokens_icon.png delete mode 100644 packages/website/public/images/landing/stocks.png delete mode 100644 packages/website/public/images/landing/tokenized_world.png delete mode 100644 packages/website/public/images/launch_kit/0x_cupboard.svg delete mode 100644 packages/website/public/images/launch_kit/enable_trading.svg delete mode 100644 packages/website/public/images/launch_kit/fork.svg delete mode 100644 packages/website/public/images/launch_kit/in_game_marketplace.svg delete mode 100644 packages/website/public/images/launch_kit/local_market.svg delete mode 100644 packages/website/public/images/launch_kit/secondary_market.svg delete mode 100644 packages/website/public/images/launch_kit/shared_liquidity.svg delete mode 100644 packages/website/public/images/ledger_icon.png delete mode 100644 packages/website/public/images/lock_icon.svg delete mode 100644 packages/website/public/images/logos/FBG.png delete mode 100644 packages/website/public/images/logos/aragon.png delete mode 100644 packages/website/public/images/logos/augur.png delete mode 100644 packages/website/public/images/logos/blockchain_capital.png delete mode 100644 packages/website/public/images/logos/chronobank.png delete mode 100644 packages/website/public/images/logos/dharma.png delete mode 100644 packages/website/public/images/logos/district0x.png delete mode 100644 packages/website/public/images/logos/jen_advisors.png delete mode 100644 packages/website/public/images/logos/maker.png delete mode 100644 packages/website/public/images/logos/melonport.png delete mode 100644 packages/website/public/images/logos/openANX.png delete mode 100644 packages/website/public/images/logos/pantera_capital.png delete mode 100644 packages/website/public/images/logos/polychain_capital.png delete mode 100644 packages/website/public/images/metamask_icon.png delete mode 100644 packages/website/public/images/metamask_or_parity.png delete mode 100644 packages/website/public/images/network_icons/kovan.png delete mode 100644 packages/website/public/images/network_icons/mainnet.png delete mode 100644 packages/website/public/images/network_icons/rinkeby.png delete mode 100644 packages/website/public/images/network_icons/ropsten.png delete mode 100644 packages/website/public/images/og_image.png delete mode 100644 packages/website/public/images/press/logo-forbes.png delete mode 100644 packages/website/public/images/press/logo-fortune.png delete mode 100644 packages/website/public/images/press/logo-techcrunch.png delete mode 100644 packages/website/public/images/press/logo-venturebeat.png delete mode 100644 packages/website/public/images/protocol_logo_black.png delete mode 100644 packages/website/public/images/protocol_logo_white.png delete mode 100755 packages/website/public/images/relayer-logos/logo.png delete mode 100755 packages/website/public/images/relayer-logos/logo_1.png delete mode 100755 packages/website/public/images/relayer-logos/logo_2.1.png delete mode 100755 packages/website/public/images/relayer-logos/logo_2.2.png delete mode 100755 packages/website/public/images/relayer-logos/logo_2.3.png delete mode 100755 packages/website/public/images/relayer-logos/logo_2.png delete mode 100755 packages/website/public/images/relayer-logos/logo_3.png delete mode 100755 packages/website/public/images/relayer-logos/logo_4.png delete mode 100755 packages/website/public/images/relayer-logos/logo_5.png delete mode 100644 packages/website/public/images/relayer_fallback.png delete mode 100644 packages/website/public/images/setup_account_icon.svg delete mode 100644 packages/website/public/images/social/discord.png delete mode 100644 packages/website/public/images/social/discourse.png delete mode 100644 packages/website/public/images/social/github.png delete mode 100644 packages/website/public/images/social/medium.png delete mode 100644 packages/website/public/images/social/reddit.png delete mode 100644 packages/website/public/images/social/slack.png delete mode 100644 packages/website/public/images/social/twitter.png delete mode 100755 packages/website/public/images/team/advisors/davids.jpg delete mode 100755 packages/website/public/images/team/advisors/frede.jpg delete mode 100755 packages/website/public/images/team/advisors/joeyk.jpg delete mode 100755 packages/website/public/images/team/advisors/lindax.jpg delete mode 100755 packages/website/public/images/team/advisors/olafc.jpg delete mode 100755 packages/website/public/images/team/alexb.jpg delete mode 100755 packages/website/public/images/team/alexv.jpg delete mode 100755 packages/website/public/images/team/amirb.jpg delete mode 100755 packages/website/public/images/team/benb.jpg delete mode 100755 packages/website/public/images/team/blake.jpg delete mode 100755 packages/website/public/images/team/brandonm.jpg delete mode 100755 packages/website/public/images/team/chrisk.jpg delete mode 100755 packages/website/public/images/team/clayr.jpg delete mode 100755 packages/website/public/images/team/eugenea.jpg delete mode 100755 packages/website/public/images/team/fabiob.jpg delete mode 100755 packages/website/public/images/team/francesco.jpg delete mode 100755 packages/website/public/images/team/greg.jpg delete mode 100755 packages/website/public/images/team/jacobe.jpg delete mode 100755 packages/website/public/images/team/jasons.jpg delete mode 100755 packages/website/public/images/team/leonidL.jpg delete mode 100755 packages/website/public/images/team/mattt.jpg delete mode 100755 packages/website/public/images/team/melo.jpg delete mode 100644 packages/website/public/images/team/oshirob.png delete mode 100755 packages/website/public/images/team/peterz.jpg delete mode 100755 packages/website/public/images/team/rahuls.jpg delete mode 100755 packages/website/public/images/team/remcoB.jpg delete mode 100755 packages/website/public/images/team/steveK.jpg delete mode 100755 packages/website/public/images/team/toms.jpg delete mode 100755 packages/website/public/images/team/weijew.jpg delete mode 100755 packages/website/public/images/team/willw.jpg delete mode 100755 packages/website/public/images/team/xianny.jpg delete mode 100755 packages/website/public/images/team/zack.jpg delete mode 100644 packages/website/public/images/token_icons/1ST.png delete mode 100644 packages/website/public/images/token_icons/ABYSS.png delete mode 100644 packages/website/public/images/token_icons/ADT.png delete mode 100644 packages/website/public/images/token_icons/AE.png delete mode 100644 packages/website/public/images/token_icons/AION.png delete mode 100644 packages/website/public/images/token_icons/AIR.png delete mode 100644 packages/website/public/images/token_icons/ANT.png delete mode 100644 packages/website/public/images/token_icons/APCC.png delete mode 100644 packages/website/public/images/token_icons/APPC.png delete mode 100644 packages/website/public/images/token_icons/ARN.png delete mode 100644 packages/website/public/images/token_icons/ART.png delete mode 100644 packages/website/public/images/token_icons/AST.png delete mode 100644 packages/website/public/images/token_icons/BAT.png delete mode 100644 packages/website/public/images/token_icons/BCAP.png delete mode 100644 packages/website/public/images/token_icons/BCPT.png delete mode 100644 packages/website/public/images/token_icons/BNT.png delete mode 100644 packages/website/public/images/token_icons/BRM.png delete mode 100644 packages/website/public/images/token_icons/CAG.png delete mode 100644 packages/website/public/images/token_icons/CAN.png delete mode 100644 packages/website/public/images/token_icons/CAT.png delete mode 100644 packages/website/public/images/token_icons/CFI.png delete mode 100644 packages/website/public/images/token_icons/CVC.png delete mode 100644 packages/website/public/images/token_icons/DAI.png delete mode 100644 packages/website/public/images/token_icons/DATA.png delete mode 100644 packages/website/public/images/token_icons/DEB.png delete mode 100644 packages/website/public/images/token_icons/DGD.png delete mode 100644 packages/website/public/images/token_icons/DIVX.png delete mode 100644 packages/website/public/images/token_icons/DNT.png delete mode 100644 packages/website/public/images/token_icons/EDG.png delete mode 100644 packages/website/public/images/token_icons/EDU.png delete mode 100644 packages/website/public/images/token_icons/ELEC.png delete mode 100644 packages/website/public/images/token_icons/EMONT.png delete mode 100644 packages/website/public/images/token_icons/ENG.png delete mode 100644 packages/website/public/images/token_icons/ENTR.png delete mode 100644 packages/website/public/images/token_icons/EOS.png delete mode 100644 packages/website/public/images/token_icons/EVE.png delete mode 100644 packages/website/public/images/token_icons/FUN.png delete mode 100644 packages/website/public/images/token_icons/GEE.png delete mode 100644 packages/website/public/images/token_icons/GEN.png delete mode 100644 packages/website/public/images/token_icons/GET.png delete mode 100644 packages/website/public/images/token_icons/GNO.png delete mode 100644 packages/website/public/images/token_icons/GNT.png delete mode 100644 packages/website/public/images/token_icons/HGT.png delete mode 100644 packages/website/public/images/token_icons/HOT.png delete mode 100644 packages/website/public/images/token_icons/ICN.png delete mode 100644 packages/website/public/images/token_icons/IND.png delete mode 100644 packages/website/public/images/token_icons/J8T.png delete mode 100644 packages/website/public/images/token_icons/JET.png delete mode 100644 packages/website/public/images/token_icons/KIN.png delete mode 100644 packages/website/public/images/token_icons/KNC.png delete mode 100644 packages/website/public/images/token_icons/LINK.png delete mode 100644 packages/website/public/images/token_icons/LOOM.png delete mode 100644 packages/website/public/images/token_icons/LUN.png delete mode 100644 packages/website/public/images/token_icons/MANA.png delete mode 100644 packages/website/public/images/token_icons/MCO.png delete mode 100644 packages/website/public/images/token_icons/MKR.png delete mode 100644 packages/website/public/images/token_icons/MLN.png delete mode 100644 packages/website/public/images/token_icons/MOD.png delete mode 100644 packages/website/public/images/token_icons/MORPH.png delete mode 100644 packages/website/public/images/token_icons/MOT.png delete mode 100644 packages/website/public/images/token_icons/MTL.png delete mode 100644 packages/website/public/images/token_icons/NANJ.png delete mode 100644 packages/website/public/images/token_icons/NAVI.png delete mode 100644 packages/website/public/images/token_icons/NCT.png delete mode 100644 packages/website/public/images/token_icons/NDC.png delete mode 100644 packages/website/public/images/token_icons/NEXO.png delete mode 100644 packages/website/public/images/token_icons/NMR.png delete mode 100644 packages/website/public/images/token_icons/OAX.png delete mode 100644 packages/website/public/images/token_icons/OCC.png delete mode 100644 packages/website/public/images/token_icons/OMG.png delete mode 100644 packages/website/public/images/token_icons/OMX.png delete mode 100644 packages/website/public/images/token_icons/PAL.png delete mode 100644 packages/website/public/images/token_icons/PAY.png delete mode 100644 packages/website/public/images/token_icons/PKT.png delete mode 100644 packages/website/public/images/token_icons/PLAY.png delete mode 100644 packages/website/public/images/token_icons/PLU.png delete mode 100644 packages/website/public/images/token_icons/POLY.png delete mode 100644 packages/website/public/images/token_icons/QTUM.png delete mode 100644 packages/website/public/images/token_icons/REN.png delete mode 100644 packages/website/public/images/token_icons/REP.png delete mode 100644 packages/website/public/images/token_icons/REQ.png delete mode 100644 packages/website/public/images/token_icons/RFR.png delete mode 100644 packages/website/public/images/token_icons/RLC.png delete mode 100644 packages/website/public/images/token_icons/ROL.png delete mode 100644 packages/website/public/images/token_icons/RVT.png delete mode 100644 packages/website/public/images/token_icons/SALT.png delete mode 100644 packages/website/public/images/token_icons/SAN.png delete mode 100644 packages/website/public/images/token_icons/SIG.png delete mode 100644 packages/website/public/images/token_icons/SNGLS.png delete mode 100644 packages/website/public/images/token_icons/SNT.png delete mode 100644 packages/website/public/images/token_icons/SPANK.png delete mode 100644 packages/website/public/images/token_icons/SPN.png delete mode 100644 packages/website/public/images/token_icons/SS.png delete mode 100644 packages/website/public/images/token_icons/STORJ.png delete mode 100644 packages/website/public/images/token_icons/SUB.png delete mode 100644 packages/website/public/images/token_icons/SWT.png delete mode 100644 packages/website/public/images/token_icons/SXDT.png delete mode 100644 packages/website/public/images/token_icons/TAAS.png delete mode 100644 packages/website/public/images/token_icons/TIME.png delete mode 100644 packages/website/public/images/token_icons/TKN.png delete mode 100644 packages/website/public/images/token_icons/TRL.png delete mode 100644 packages/website/public/images/token_icons/TRST.png delete mode 100644 packages/website/public/images/token_icons/TRX.png delete mode 100644 packages/website/public/images/token_icons/UPP.png delete mode 100644 packages/website/public/images/token_icons/VSL.png delete mode 100644 packages/website/public/images/token_icons/WAND.png delete mode 100644 packages/website/public/images/token_icons/WETH.png delete mode 100644 packages/website/public/images/token_icons/WINGS.png delete mode 100644 packages/website/public/images/token_icons/WTC.png delete mode 100644 packages/website/public/images/token_icons/WYV.png delete mode 100644 packages/website/public/images/token_icons/XAUR.png delete mode 100644 packages/website/public/images/token_icons/XNK.png delete mode 100644 packages/website/public/images/token_icons/XSC.png delete mode 100644 packages/website/public/images/token_icons/XYO.png delete mode 100644 packages/website/public/images/token_icons/ZIL.png delete mode 100644 packages/website/public/images/token_icons/ZRX.png delete mode 100644 packages/website/public/images/toshi_logo.jpg delete mode 100644 packages/website/public/images/trade_arrows.png delete mode 100644 packages/website/public/images/unlock-mm.png delete mode 100644 packages/website/public/images/wrapped_eth_gray.png delete mode 100644 packages/website/public/images/zrx_ecosystem.svg delete mode 100644 packages/website/public/images/zrx_pie_chart.png delete mode 100644 packages/website/public/images/zrx_token.png delete mode 100644 packages/website/public/index.html delete mode 100644 packages/website/public/js/rollbar.umd.min.js delete mode 100644 packages/website/public/pdfs/0x_white_paper.pdf delete mode 100644 packages/website/translations/chinese.json delete mode 100644 packages/website/translations/english.json delete mode 100644 packages/website/translations/korean.json delete mode 100644 packages/website/translations/russian.json delete mode 100644 packages/website/translations/spanish.json delete mode 100644 packages/website/ts/blockchain.ts delete mode 100644 packages/website/ts/blockchain_watcher.ts delete mode 100644 packages/website/ts/components/aboutPageLayout.tsx delete mode 100644 packages/website/ts/components/animatedChatIcon.tsx delete mode 100644 packages/website/ts/components/animatedCompassIcon.tsx delete mode 100644 packages/website/ts/components/banner.tsx delete mode 100644 packages/website/ts/components/blockIconLink.tsx delete mode 100644 packages/website/ts/components/button.tsx delete mode 100644 packages/website/ts/components/chapter_link.tsx delete mode 100644 packages/website/ts/components/definition.tsx delete mode 100644 packages/website/ts/components/dialogs/blockchain_err_dialog.tsx delete mode 100644 packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx delete mode 100644 packages/website/ts/components/dialogs/ledger_config_dialog.tsx delete mode 100644 packages/website/ts/components/dialogs/portal_disclaimer_dialog.tsx delete mode 100644 packages/website/ts/components/dialogs/send_dialog.tsx delete mode 100644 packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx delete mode 100644 packages/website/ts/components/documentation/docs_logo.tsx delete mode 100644 packages/website/ts/components/documentation/docs_top_bar.tsx delete mode 100644 packages/website/ts/components/documentation/overview_content.tsx delete mode 100644 packages/website/ts/components/documentation/sidebar_header.tsx delete mode 100644 packages/website/ts/components/documentation/tutorial_button.tsx delete mode 100644 packages/website/ts/components/documentation/version_drop_down.tsx delete mode 100644 packages/website/ts/components/dropdowns/developers_drop_down.tsx delete mode 100644 packages/website/ts/components/dropdowns/dropdown_developers.tsx delete mode 100644 packages/website/ts/components/dropdowns/dropdown_products.tsx delete mode 100644 packages/website/ts/components/dropdowns/network_drop_down.tsx delete mode 100644 packages/website/ts/components/eth_weth_conversion_button.tsx delete mode 100644 packages/website/ts/components/eth_wrappers.tsx delete mode 100644 packages/website/ts/components/fill_order.tsx delete mode 100644 packages/website/ts/components/fill_order_json.tsx delete mode 100644 packages/website/ts/components/fill_warning_dialog.tsx delete mode 100644 packages/website/ts/components/flash_messages/asset_send_completed.tsx delete mode 100644 packages/website/ts/components/flash_messages/transaction_submitted.tsx delete mode 100644 packages/website/ts/components/footer.tsx delete mode 100644 packages/website/ts/components/generate_order/asset_picker.tsx delete mode 100644 packages/website/ts/components/generate_order/generate_order_form.tsx delete mode 100644 packages/website/ts/components/generate_order/new_token_form.tsx delete mode 100644 packages/website/ts/components/hamburger.tsx delete mode 100644 packages/website/ts/components/header.tsx delete mode 100644 packages/website/ts/components/hero.tsx delete mode 100644 packages/website/ts/components/heroAnimation.tsx delete mode 100644 packages/website/ts/components/heroImage.tsx delete mode 100644 packages/website/ts/components/icon.tsx delete mode 100644 packages/website/ts/components/image.tsx delete mode 100644 packages/website/ts/components/inputs/address_input.tsx delete mode 100644 packages/website/ts/components/inputs/allowance_state_toggle.tsx delete mode 100644 packages/website/ts/components/inputs/balance_bounded_input.tsx delete mode 100644 packages/website/ts/components/inputs/eth_amount_input.tsx delete mode 100644 packages/website/ts/components/inputs/expiration_input.tsx delete mode 100644 packages/website/ts/components/inputs/hash_input.tsx delete mode 100644 packages/website/ts/components/inputs/identicon_address_input.tsx delete mode 100644 packages/website/ts/components/inputs/token_amount_input.tsx delete mode 100644 packages/website/ts/components/inputs/token_input.tsx delete mode 100644 packages/website/ts/components/link.tsx delete mode 100644 packages/website/ts/components/logo.tsx delete mode 100644 packages/website/ts/components/meta_tags.tsx delete mode 100644 packages/website/ts/components/mobileNav.tsx delete mode 100644 packages/website/ts/components/modals/input.tsx delete mode 100644 packages/website/ts/components/modals/modal_contact.tsx delete mode 100644 packages/website/ts/components/nested_sidebar_menu.tsx delete mode 100644 packages/website/ts/components/newLayout.tsx delete mode 100644 packages/website/ts/components/newsletter_form.tsx delete mode 100644 packages/website/ts/components/old_footer.tsx delete mode 100644 packages/website/ts/components/onboarding/add_eth_onboarding_step.tsx delete mode 100644 packages/website/ts/components/onboarding/congrats_onboarding_step.tsx delete mode 100644 packages/website/ts/components/onboarding/install_wallet_onboarding_step.tsx delete mode 100644 packages/website/ts/components/onboarding/intro_onboarding_step.tsx delete mode 100644 packages/website/ts/components/onboarding/onboarding_card.tsx delete mode 100644 packages/website/ts/components/onboarding/onboarding_flow.tsx delete mode 100644 packages/website/ts/components/onboarding/onboarding_tooltip.tsx delete mode 100644 packages/website/ts/components/onboarding/portal_onboarding_flow.tsx delete mode 100644 packages/website/ts/components/onboarding/set_allowances_onboarding_step.tsx delete mode 100644 packages/website/ts/components/onboarding/unlock_wallet_onboarding_step.tsx delete mode 100644 packages/website/ts/components/onboarding/wrap_eth_onboarding_step.tsx delete mode 100644 packages/website/ts/components/order_json.tsx delete mode 100644 packages/website/ts/components/portal/back_button.tsx delete mode 100644 packages/website/ts/components/portal/drawer_menu.tsx delete mode 100644 packages/website/ts/components/portal/loading.tsx delete mode 100644 packages/website/ts/components/portal/menu.tsx delete mode 100644 packages/website/ts/components/portal/portal.tsx delete mode 100644 packages/website/ts/components/portal/section.tsx delete mode 100644 packages/website/ts/components/portal/text_header.tsx delete mode 100644 packages/website/ts/components/relayer_index/relayer_grid_tile.tsx delete mode 100644 packages/website/ts/components/relayer_index/relayer_index.tsx delete mode 100644 packages/website/ts/components/relayer_index/relayer_top_tokens.tsx delete mode 100644 packages/website/ts/components/sections/landing/about.tsx delete mode 100644 packages/website/ts/components/sections/landing/clients.tsx delete mode 100644 packages/website/ts/components/sections/landing/cta.tsx delete mode 100644 packages/website/ts/components/sections/landing/hero.tsx delete mode 100644 packages/website/ts/components/send_button.tsx delete mode 100644 packages/website/ts/components/siteWrap.tsx delete mode 100644 packages/website/ts/components/slider/slider.tsx delete mode 100644 packages/website/ts/components/text.tsx delete mode 100644 packages/website/ts/components/token_balances.tsx delete mode 100644 packages/website/ts/components/top_bar/provider_display.tsx delete mode 100644 packages/website/ts/components/top_bar/top_bar.tsx delete mode 100644 packages/website/ts/components/top_bar/top_bar_menu_item.tsx delete mode 100644 packages/website/ts/components/track_token_confirmation.tsx delete mode 100644 packages/website/ts/components/trade_history/trade_history.tsx delete mode 100644 packages/website/ts/components/trade_history/trade_history_item.tsx delete mode 100644 packages/website/ts/components/ui/account_connection.tsx delete mode 100644 packages/website/ts/components/ui/alert.tsx delete mode 100644 packages/website/ts/components/ui/allowance_state_view.tsx delete mode 100644 packages/website/ts/components/ui/balance.tsx delete mode 100644 packages/website/ts/components/ui/button.tsx delete mode 100644 packages/website/ts/components/ui/check_mark.tsx delete mode 100644 packages/website/ts/components/ui/circle.tsx delete mode 100644 packages/website/ts/components/ui/container.tsx delete mode 100644 packages/website/ts/components/ui/copy_icon.tsx delete mode 100644 packages/website/ts/components/ui/custom_menu_item.tsx delete mode 100644 packages/website/ts/components/ui/drop_down.tsx delete mode 100644 packages/website/ts/components/ui/ease_up_from_bottom_animation.tsx delete mode 100644 packages/website/ts/components/ui/ethereum_address.tsx delete mode 100644 packages/website/ts/components/ui/etherscan_icon.tsx delete mode 100644 packages/website/ts/components/ui/fake_text_field.tsx delete mode 100644 packages/website/ts/components/ui/flash_message.tsx delete mode 100644 packages/website/ts/components/ui/help_tooltip.tsx delete mode 100644 packages/website/ts/components/ui/icon_button.tsx delete mode 100644 packages/website/ts/components/ui/identicon.tsx delete mode 100644 packages/website/ts/components/ui/image.tsx delete mode 100644 packages/website/ts/components/ui/input_label.tsx delete mode 100644 packages/website/ts/components/ui/island.tsx delete mode 100644 packages/website/ts/components/ui/lifecycle_raised_button.tsx delete mode 100644 packages/website/ts/components/ui/multi_select.tsx delete mode 100644 packages/website/ts/components/ui/overlay.tsx delete mode 100644 packages/website/ts/components/ui/party.tsx delete mode 100644 packages/website/ts/components/ui/pointer.tsx delete mode 100644 packages/website/ts/components/ui/required_label.tsx delete mode 100644 packages/website/ts/components/ui/retry.tsx delete mode 100644 packages/website/ts/components/ui/simple_menu.tsx delete mode 100644 packages/website/ts/components/ui/spinner.tsx delete mode 100644 packages/website/ts/components/ui/swap_icon.tsx delete mode 100644 packages/website/ts/components/ui/text.tsx delete mode 100644 packages/website/ts/components/ui/token_icon.tsx delete mode 100644 packages/website/ts/components/visual_order.tsx delete mode 100644 packages/website/ts/components/wallet/body_overlay.tsx delete mode 100644 packages/website/ts/components/wallet/null_token_row.tsx delete mode 100644 packages/website/ts/components/wallet/placeholder.tsx delete mode 100644 packages/website/ts/components/wallet/standard_icon_row.tsx delete mode 100644 packages/website/ts/components/wallet/wallet.tsx delete mode 100644 packages/website/ts/components/wallet/wrap_ether_item.tsx delete mode 100644 packages/website/ts/constants/.gitkeep delete mode 100644 packages/website/ts/constants/animations.tsx delete mode 100644 packages/website/ts/constants/cssReset.js delete mode 100644 packages/website/ts/constants/globalStyle.tsx delete mode 100644 packages/website/ts/constants/utilities.tsx delete mode 100644 packages/website/ts/containers/asset_buyer_documentation.ts delete mode 100644 packages/website/ts/containers/connect_documentation.ts delete mode 100644 packages/website/ts/containers/contract_wrappers_documentation.ts delete mode 100644 packages/website/ts/containers/docs_home.ts delete mode 100644 packages/website/ts/containers/ethereum_types_documentation.ts delete mode 100644 packages/website/ts/containers/faq.ts delete mode 100644 packages/website/ts/containers/generate_order_form.ts delete mode 100644 packages/website/ts/containers/inputs/allowance_state_toggle.ts delete mode 100644 packages/website/ts/containers/inputs/eth_amount_input.ts delete mode 100644 packages/website/ts/containers/json_schemas_documentation.ts delete mode 100644 packages/website/ts/containers/migrations_documentation.ts delete mode 100644 packages/website/ts/containers/not_found.ts delete mode 100644 packages/website/ts/containers/order_utils_documentation.ts delete mode 100644 packages/website/ts/containers/order_watcher_documentation.ts delete mode 100644 packages/website/ts/containers/portal.ts delete mode 100644 packages/website/ts/containers/portal_onboarding_flow.ts delete mode 100644 packages/website/ts/containers/smart_contracts_documentation.ts delete mode 100644 packages/website/ts/containers/sol_compiler_documentation.ts delete mode 100644 packages/website/ts/containers/sol_coverage_documentation.ts delete mode 100644 packages/website/ts/containers/sol_profiler_documentation.ts delete mode 100644 packages/website/ts/containers/sol_trace_documentation.ts delete mode 100644 packages/website/ts/containers/subproviders_documentation.ts delete mode 100644 packages/website/ts/containers/web3_wrapper_documentation.ts delete mode 100644 packages/website/ts/containers/wiki.ts delete mode 100644 packages/website/ts/containers/zero_ex_js_documentation.ts delete mode 100644 packages/website/ts/globals.d.ts delete mode 100755 packages/website/ts/icons/illustrations/0x.svg delete mode 100755 packages/website/ts/icons/illustrations/buildBusiness.svg delete mode 100644 packages/website/ts/icons/illustrations/checkmark.svg delete mode 100644 packages/website/ts/icons/illustrations/code-repo.svg delete mode 100644 packages/website/ts/icons/illustrations/coin.svg delete mode 100644 packages/website/ts/icons/illustrations/consistently-ship.svg delete mode 100644 packages/website/ts/icons/illustrations/customize.svg delete mode 100755 packages/website/ts/icons/illustrations/decentralisedLoans.svg delete mode 100755 packages/website/ts/icons/illustrations/description.svg delete mode 100755 packages/website/ts/icons/illustrations/descriptionBolt.svg delete mode 100755 packages/website/ts/icons/illustrations/descriptionCoin.svg delete mode 100755 packages/website/ts/icons/illustrations/descriptionCopy.svg delete mode 100755 packages/website/ts/icons/illustrations/descriptionFlask.svg delete mode 100755 packages/website/ts/icons/illustrations/eficientDesign.svg delete mode 100644 packages/website/ts/icons/illustrations/eth-based-tokens.svg delete mode 100755 packages/website/ts/icons/illustrations/extensibleArchitecture.svg delete mode 100755 packages/website/ts/icons/illustrations/flexibleIntegration.svg delete mode 100755 packages/website/ts/icons/illustrations/flexibleIntegration0xInstant.svg delete mode 100755 packages/website/ts/icons/illustrations/flexibleOrders.svg delete mode 100755 packages/website/ts/icons/illustrations/gamingAndCollectibles.svg delete mode 100755 packages/website/ts/icons/illustrations/generateRevenueForYourBusiness-large.svg delete mode 100755 packages/website/ts/icons/illustrations/getInTouch.svg delete mode 100644 packages/website/ts/icons/illustrations/getStarted.svg delete mode 100644 packages/website/ts/icons/illustrations/launchKit.svg delete mode 100755 packages/website/ts/icons/illustrations/launchKit_versionB.svg delete mode 100755 packages/website/ts/icons/illustrations/legalResources.svg delete mode 100644 packages/website/ts/icons/illustrations/logo-mark.svg delete mode 100644 packages/website/ts/icons/illustrations/logo-outlined.svg delete mode 100644 packages/website/ts/icons/illustrations/long-term-impact.svg delete mode 100644 packages/website/ts/icons/illustrations/low-cost.svg delete mode 100755 packages/website/ts/icons/illustrations/marketingDesignHelp.svg delete mode 100755 packages/website/ts/icons/illustrations/milestoneGrants.svg delete mode 100755 packages/website/ts/icons/illustrations/networkedLiquidity-small.svg delete mode 100755 packages/website/ts/icons/illustrations/networkedLiquidity.svg delete mode 100755 packages/website/ts/icons/illustrations/orderBooks.svg delete mode 100755 packages/website/ts/icons/illustrations/predictionMarkets.svg delete mode 100644 packages/website/ts/icons/illustrations/protocol.svg delete mode 100644 packages/website/ts/icons/illustrations/ready-to-build.svg delete mode 100755 packages/website/ts/icons/illustrations/recruitingSupport.svg delete mode 100644 packages/website/ts/icons/illustrations/right-thing.svg delete mode 100755 packages/website/ts/icons/illustrations/robustSmartContracts.svg delete mode 100644 packages/website/ts/icons/illustrations/rocketship.svg delete mode 100755 packages/website/ts/icons/illustrations/secureTrading.svg delete mode 100644 packages/website/ts/icons/illustrations/social-discord.svg delete mode 100644 packages/website/ts/icons/illustrations/social-fb.svg delete mode 100644 packages/website/ts/icons/illustrations/social-github.svg delete mode 100644 packages/website/ts/icons/illustrations/social-newsletter.svg delete mode 100644 packages/website/ts/icons/illustrations/social-reddit.svg delete mode 100644 packages/website/ts/icons/illustrations/social-twitter.svg delete mode 100755 packages/website/ts/icons/illustrations/stableTokens.svg delete mode 100755 packages/website/ts/icons/illustrations/standardForExchange.svg delete mode 100644 packages/website/ts/icons/illustrations/support.svg delete mode 100755 packages/website/ts/icons/illustrations/supportForAllEthereumStandards-large.svg delete mode 100755 packages/website/ts/icons/illustrations/supportForAllEthereumStandards.svg delete mode 100755 packages/website/ts/icons/illustrations/techSupport.svg delete mode 100644 packages/website/ts/icons/illustrations/tokens.svg delete mode 100755 packages/website/ts/icons/illustrations/vcIntroductions.svg delete mode 100644 packages/website/ts/icons/logo-with-type.svg delete mode 100644 packages/website/ts/index.tsx delete mode 100644 packages/website/ts/lazy_component.tsx delete mode 100644 packages/website/ts/local_storage/local_storage.ts delete mode 100644 packages/website/ts/local_storage/state_storage.ts delete mode 100644 packages/website/ts/local_storage/tracked_token_storage.ts delete mode 100644 packages/website/ts/local_storage/trade_history_storage.tsx delete mode 100644 packages/website/ts/pages/about/jobs.tsx delete mode 100644 packages/website/ts/pages/about/mission.tsx delete mode 100644 packages/website/ts/pages/about/press.tsx delete mode 100644 packages/website/ts/pages/about/team.tsx delete mode 100644 packages/website/ts/pages/community.tsx delete mode 100644 packages/website/ts/pages/documentation/developers_page.tsx delete mode 100644 packages/website/ts/pages/documentation/doc_page.tsx delete mode 100644 packages/website/ts/pages/documentation/docs_home.tsx delete mode 100644 packages/website/ts/pages/ecosystem.tsx delete mode 100644 packages/website/ts/pages/faq/faq.tsx delete mode 100644 packages/website/ts/pages/faq/question.tsx delete mode 100644 packages/website/ts/pages/fullscreen_message.tsx delete mode 100644 packages/website/ts/pages/instant.tsx delete mode 100644 packages/website/ts/pages/instant/code_demo.tsx delete mode 100644 packages/website/ts/pages/instant/config_generator.tsx delete mode 100644 packages/website/ts/pages/instant/config_generator_address_input.tsx delete mode 100644 packages/website/ts/pages/instant/configurator.tsx delete mode 100644 packages/website/ts/pages/instant/fee_percentage_slider.tsx delete mode 100644 packages/website/ts/pages/instant/rc-slider.css delete mode 100644 packages/website/ts/pages/instant/select.tsx delete mode 100644 packages/website/ts/pages/landing.tsx delete mode 100644 packages/website/ts/pages/launch_kit.tsx delete mode 100644 packages/website/ts/pages/market_maker.tsx delete mode 100644 packages/website/ts/pages/not_found.tsx delete mode 100644 packages/website/ts/pages/why.tsx delete mode 100644 packages/website/ts/pages/wiki/wiki.tsx delete mode 100644 packages/website/ts/redux/analyticsMiddleware.ts delete mode 100644 packages/website/ts/redux/dispatcher.ts delete mode 100644 packages/website/ts/redux/reducer.ts delete mode 100644 packages/website/ts/redux/store.ts delete mode 100644 packages/website/ts/schemas/metadata_schema.ts delete mode 100644 packages/website/ts/schemas/portal_order_schema.ts delete mode 100644 packages/website/ts/schemas/portal_token_metadata.ts delete mode 100644 packages/website/ts/schemas/validator.ts delete mode 100644 packages/website/ts/style/colors.ts delete mode 100644 packages/website/ts/style/keyframes.ts delete mode 100644 packages/website/ts/style/media.ts delete mode 100644 packages/website/ts/style/theme.ts delete mode 100644 packages/website/ts/style/z_index.ts delete mode 100644 packages/website/ts/types.ts delete mode 100644 packages/website/ts/utils/analytics.ts delete mode 100644 packages/website/ts/utils/backend_client.ts delete mode 100644 packages/website/ts/utils/configs.ts delete mode 100644 packages/website/ts/utils/constants.ts delete mode 100644 packages/website/ts/utils/doc_utils.ts delete mode 100644 packages/website/ts/utils/documentation_container.ts delete mode 100644 packages/website/ts/utils/error_reporter.ts delete mode 100644 packages/website/ts/utils/fake_token_registry.ts delete mode 100644 packages/website/ts/utils/fetch_utils.ts delete mode 100644 packages/website/ts/utils/mui_theme.ts delete mode 100644 packages/website/ts/utils/order_parser.ts delete mode 100644 packages/website/ts/utils/token_address_overrides.ts delete mode 100644 packages/website/ts/utils/translate.ts delete mode 100644 packages/website/ts/utils/utils.ts delete mode 100644 packages/website/ts/vendor/u2f_api.js delete mode 100644 packages/website/tsconfig.json delete mode 100644 packages/website/tslint.json delete mode 100644 packages/website/webpack.config.js (limited to 'packages') diff --git a/packages/0x.js/.npmignore b/packages/0x.js/.npmignore deleted file mode 100644 index 312a23faa..000000000 --- a/packages/0x.js/.npmignore +++ /dev/null @@ -1,10 +0,0 @@ -.* -tsconfig.json -webpack.config.js -yarn-error.log -test/ -/src/ -/abi-gen-templates/ -/generated_docs/ -/scripts/ -/lib/src/monorepo_scripts/ diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json deleted file mode 100644 index 20778f8bb..000000000 --- a/packages/0x.js/CHANGELOG.json +++ /dev/null @@ -1,1425 +0,0 @@ -[ - { - "version": "4.0.0", - "changes": [ - { - "note": "Upgrade the bignumber.js to v8.0.2", - "pr": 1517 - } - ] - }, - { - "timestamp": 1547747677, - "version": "3.0.3", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1547561734, - "version": "3.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1547225310, - "version": "3.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "3.0.0", - "changes": [ - { - "note": "Export `MultiAssetData`, `MultiAssetDataWithRecursiveDecoding`, `ObjectMap`, and `SingleAssetData` from types. No longer export `AssetData`.", - "pr": 1363 - } - ], - "timestamp": 1547040760 - }, - { - "version": "2.0.8", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544739608 - }, - { - "version": "2.0.7", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544570656 - }, - { - "timestamp": 1543401373, - "version": "2.0.6", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542821676, - "version": "2.0.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542208198, - "version": "2.0.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542134075, - "version": "2.0.3", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542028948, - "version": "2.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "2.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1541740904 - }, - { - "version": "2.0.0", - "changes": [ - { - "note": "Add support for `eth_signTypedData`.", - "pr": 1102 - }, - { - "note": "Added `MetamaskSubprovider` to handle inconsistencies in Metamask's signing JSON RPC endpoints.", - "pr": 1102 - }, - { - "note": "Removed `SignerType` (including `SignerType.Metamask`). Please use the `MetamaskSubprovider` to wrap `web3.currentProvider`.", - "pr": 1102 - }, - { - "note": "Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers", - "pr": 1105 - }, - { - "note": "Make web3-provider-engine types a 'dependency' so it's available to users of the library", - "pr": 1105 - }, - { - "note": "Export new `AssetData` type from types", - "pr": 1131 - } - ], - "timestamp": 1539871071 - }, - { - "version": "1.0.8", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1538693146 - }, - { - "timestamp": 1538157789, - "version": "1.0.7", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537907159, - "version": "1.0.6", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537875740, - "version": "1.0.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537541580, - "version": "1.0.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "1.0.3", - "changes": [ - { - "note": "Drastically reduce the bundle size by removing unused parts of included contract artifacts." - } - ], - "timestamp": 1537369748 - }, - { - "version": "1.0.2", - "changes": [ - { - "note": "Add ZRX & WETH mainnet contract addresses into the included artifacts" - } - ], - "timestamp": 1537265493 - }, - { - "timestamp": 1536142250, - "version": "1.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "1.0.1-rc.6", - "changes": [ - { - "note": "Fix missing `BlockParamLiteral` type import issue" - } - ], - "timestamp": 1535377027 - }, - { - "version": "1.0.1-rc.5", - "changes": [ - { - "note": "Fix `main` and `types` package.json entries so that they point to the new location of index.d.ts and index.js" - } - ] - }, - { - "version": "1.0.1-rc.4", - "changes": [ - { - "note": "Re-organize the exported interface of 0x.js. Remove the `ZeroEx` class, and instead export the same exports as `0x.js`'s sub-packages: `@0xproject/contract-wrappers`, `@0xproject/order-utils` and `@0xproject/order-watcher`", - "pr": 963 - } - ], - "timestamp": 1535133899 - }, - { - "version": "1.0.1-rc.3", - "changes": [ - { - "note": "Dependencies updated" - }, - { - "pr": 914, - "note": "Update ecSignOrderHashAsync to return the signature as a string for immediate use in contracts" - } - ], - "timestamp": 1534210131 - }, - { - "version": "1.0.1-rc.2", - "changes": [ - { - "note": "Fixed bug caused by importing non-existent dep" - } - ], - "timestamp": 1532619515 - }, - { - "version": "1.0.1-rc.1", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1532605697 - }, - { - "timestamp": 1532357734, - "version": "1.0.0", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532043100, - "version": "1.0.0-rc.2", - "changes": [ - { - "note": "Remove `zeroEx.assetData` and instead re-export it's static functions directly off `ZeroEx`" - } - ] - }, - { - "timestamp": 1532043000, - "version": "1.0.0-rc.1", - "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": "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": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1529397769, - "version": "0.38.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1527617805, - "version": "0.38.3", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1527617227, - "version": "0.38.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1527616612, - "version": "0.38.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "0.38.0", - "changes": [ - { - "note": "Renamed createOrderStateWatcher to createOrderWatcherAsync since it is now async", - "pr": 579 - }, - { - "note": "Renamed ZeroExError to ContractWrappersErrors since they now lives in the @0xproject/contract-wrappers subpackage", - "pr": 579 - } - ], - "timestamp": 1527008270 - }, - { - "timestamp": 1525477860, - "version": "0.37.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1525453812, - "version": "0.37.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "0.37.0", - "changes": [ - { - "note": "Fixed expiration watcher comparator to handle orders with equal expiration times", - "pr": 526 - }, - { - "note": "Update Web3 Provider Engine to 14.0.4", - "pr": 555 - }, - { - "note": "Add `zeroEx.getProvider()`", - "pr": 559 - }, - { - "note": "Move `ZeroExError.InvalidSignature` to `@0xproject/order-utils` `OrderError.InvalidSignature`", - "pr": 559 - } - ], - "timestamp": 1525428773 - }, - { - "version": "0.36.3", - "changes": [ - { - "note": "Move @0xproject/migrations to devDependencies" - } - ], - "timestamp": 1524079658 - }, - { - "timestamp": 1524073495, - "version": "0.36.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "0.36.1", - "changes": [ - { - "note": "Internal changes and refactoring" - }, - { - "note": "Fix redundant expired order removal bug", - "pr": 527 - } - ], - "timestamp": 1524044013 - }, - { - "version": "0.36.0", - "changes": [ - { - "note": "Moved Web3.Provider to `@0xproject/types:Provider`", - "pr": 501 - }, - { - "note": "Add `zeroEx.exchange.getOrderStateAsync` to allow obtaining current OrderState for a signedOrder", - "pr": 510 - } - ], - "timestamp": 1523462196 - }, - { - "version": "0.35.0", - "changes": [ - { - "note": "Removed `ZeroExError.TransactionMiningTimeout` and moved it to '@0xproject/web3-wrapper' `Web3WrapperErrors.TransactionMiningTimeout`", - "pr": 485 - } - ], - "timestamp": 1522673609 - }, - { - "version": "0.34.0", - "changes": [ - { - "note": "Fix the bug causing `zeroEx.exchange.fillOrdersUpToAsync` validation to fail if there were some extra orders passed", - "pr": 470 - }, - { - "note": "Remove automatic instantiation of `zeroEx.orderStateWatcher`", - "pr": 488 - }, - { - "note": "Add `zeroEx.createOrderStateWatcher` to allow creating arbitrary number of OrderStateWatchers", - "pr": 488 - }, - { - "note": "Added `stateLayer` setting to `OrderStateWatcherConfig` so OrderStateWatcher can be set to monitor different blockchain state layers", - "pr": 488 - } - ], - "timestamp": 1522658513 - }, - { - "version": "0.33.2", - "changes": [ - { - "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", - "pr": 452 - }, - { - "note": "Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package", - "pr": 456 - } - ], - "timestamp": 1521298800 - }, - { - "version": "0.33.1", - "changes": [ - { - "note": "Add missing EthersJs typescript typings as dependency" - } - ], - "timestamp": 1520434800 - }, - { - "version": "0.33.0", - "changes": [ - { - "note": "Validate and lowercase all addresses in public methods", - "pr": 373 - }, - { - "note": "Improve validation to force passing contract addresses on private networks", - "pr": 385 - }, - { - "note": "Change `LogErrorContractEventArgs.errorId` type from `BigNumber` to `number`", - "pr": 413 - }, - { - "note": "Rename all public `_unsubscribeAll` methods to `unsubscribeAll`", - "pr": 415 - }, - { - "note": "Move web3 typings from devDep to dep since cannot use this package without it", - "pr": 429 - } - ], - "timestamp": 1520089200 - }, - { - "version": "0.32.2", - "changes": [ - { - "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": 389 - } - ], - "timestamp": 1518102000 - }, - { - "version": "0.32.1", - "changes": [ - { - "note": "Reorganized `BlockParamLiteral` export into `@0xproject/types` package", - "pr": 355 - }, - { - "note": "Now using `abi-gen` package to generate ContractEventArgs types", - "pr": 371 - } - ], - "timestamp": 1517929200 - }, - { - "version": "0.32.0", - "changes": [ - { - "note": "Add `zeroEx.etherToken.getContractAddressIfExists`", - "pr": 350 - }, - { - "note": "Fixed the bug causing order watcher to throw if there is an event with the same signature but different indexed fields", - "pr": 366 - } - ], - "timestamp": 1517756400 - }, - { - "version": "0.31.1", - "changes": [ - { - "note": "Fix the bug causing order watcher to throw if makerToken === zrx", - "pr": 357 - } - ], - "timestamp": 1517410800 - }, - { - "version": "0.31.0", - "changes": [ - { - "note": "Add the `shouldAddPersonalMessagePrefix` parameter to `signOrderHashAsync` so that the caller can decide on whether to add the personalMessage prefix before relaying the request to the signer. Parity Signer, Ledger and TestRPC add the prefix themselves, Metamask expects it to have already been added.", - "pr": 349 - } - ], - "timestamp": 1517238000 - }, - { - "version": "0.30.2", - "changes": [ - { - "note": "Add Rinkeby testnet addresses to artifacts ", - "pr": 337 - }, - { - "note": "Move @0xproject/types to dependencies from devDependencies fixing missing type errors" - } - ], - "timestamp": 1517151600 - }, - { - "version": "0.30.1", - "changes": [ - { - "note": "Fix a bug allowing negative fill values ", - "pr": 212 - }, - { - "note": "Fix a bug that made it impossible to pass a custom ZRX address ", - "pr": 341 - } - ], - "timestamp": 1516719600 - }, - { - "version": "0.30.0", - "changes": [ - { - "note": "Add an error parameter to the order watcher callback", - "pr": 312 - }, - { - "note": "Fix a bug making it impossible to catch some errors from awaitTransactionMinedAsync", - "pr": 312 - }, - { - "note": "Fix a bug in fillOrdersUpTo validation making it impossible to fill up to if user doesn't have enough balance to fully fill all the orders", - "pr": 321 - } - ], - "timestamp": 1516114800 - }, - { - "version": "0.29.1", - "changes": [ - { - "note": "Fixed bignumber config issue #301", - "pr": 305 - } - ], - "timestamp": 1515596400 - }, - { - "version": "0.29.0", - "changes": [ - { - "note": "Assert baseUnit amount supplied to `toUnitAmount` is integer amount.", - "pr": 287 - }, - { - "note": "`toBaseUnitAmount` throws if amount supplied has too many decimals", - "pr": 287 - } - ], - "timestamp": 1514386800 - }, - { - "version": "0.28.0", - "changes": [ - { - "note": "Add `etherTokenAddress` arg to `depositAsync` and `withdrawAsync` methods on `zeroEx.etherToken`", - "pr": 267 - }, - { - "note": "Removed accidentally included `unsubscribeAll` method from `zeroEx.proxy`, `zeroEx.etherToken` and `zeroEx.tokenRegistry`", - "pr": 267 - }, - { - "note": "Removed `etherTokenContractAddress` from `ZeroEx` constructor arg `ZeroExConfig`", - "pr": 267 - }, - { - "note": "Rename `SubscriptionOpts` to `BlockRange`", - "pr": 272 - }, - { - "note": "Add `zeroEx.etherToken.subscribe`, `zeroEx.etherToken.unsubscribe`, `zeroEx.etherToken.unsubscribeAll`", - "pr": 277 - }, - { - "note": "Add `zeroEx.etherToken.getLogsAsync`", - "pr": 277 - }, - { - "note": "Add new public types `BlockParamLiteral`, `EtherTokenEvents`, `EtherTokenContractEventArgs`, `DepositContractEventArgs`, `WithdrawalContractEventArgs`", - "pr": 277 - }, - { - "note": "Support `Deposit` and `Withdraw` events on etherToken", - "pr": 277 - }, - { - "note": "Improve the error message when taker is not a string", - "pr": 278 - } - ], - "timestamp": 1513695600 - }, - { - "version": "0.27.1", - "changes": [ - { - "note": "Export `TransactionOpts` type" - } - ], - "timestamp": 1511794800 - }, - { - "version": "0.27.0", - "changes": [ - { - "note": "Make `ZeroExConfig` required parameter of `ZeroEx` constructor", - "pr": 233 - }, - { - "note": "Add a required property `networkId` to `ZeroExConfig`", - "pr": 233 - }, - { - "note": "Make all `getContractAddress` functions, `zeroEx.exchange.subscribe`, `zeroEx.exchange.getZRXTokenAddress` sync", - "pr": 233 - }, - { - "note": "Remove `ZeroExError.ContractNotFound` and replace it with contract-specific errors", - "pr": 233 - }, - { - "note": "Make `DecodedLogEvent` contain `LogWithDecodedArgs` under log key instead of merging it in like web3 does", - "pr": 234 - }, - { - "note": "Rename `removed` to `isRemoved` in `DecodedLogEvent`", - "pr": 234 - }, - { - "note": "Add config allowing to specify gasPrice and gasLimit for every transaction sending method", - "pr": 235 - }, - { - "note": "All transaction sending methods now call `estimateGas` if no gas amount was supplied", - "pr": 235 - }, - { - "note": "Modify order validation methods to validate against the `latest` block, not against the `pending` block", - "pr": 236 - } - ], - "timestamp": 1511794800 - }, - { - "version": "0.26.0", - "changes": [ - { - "note": "Add post-formatter for logs converting `blockNumber`, `logIndex`, `transactionIndex` from hexes to numbers", - "pr": 231 - }, - { - "note": "Remove support for Async callback types when used in Subscribe functions", - "pr": 222 - }, - { - "note": "In OrderWatcher subscribe to ZRX Token Transfer and Approval events when maker token is different", - "pr": 225 - } - ], - "timestamp": 1511190000 - }, - { - "version": "0.25.1", - "changes": [ - { - "note": "Standardise on Cancelled over Canceled", - "pr": 217 - }, - { - "note": "Add missing `DecodedLogEvent` type to exported types", - "pr": 205 - }, - { - "note": "Normalized the transactionReceipt status to be `null|0|1`, 1 meaning transaction execution successful, 0 unsuccessful and `null` if it is a pre-byzantinium transaction.", - "pr": 200 - } - ], - "timestamp": 1510498800 - }, - { - "version": "0.23.0", - "changes": [ - { - "note": "Fixed unhandled promise rejection error in subscribe methods", - "pr": 209 - }, - { - "note": "Subscribe callbacks now receive an error object as their first argument" - } - ], - "timestamp": 1510412400 - }, - { - "version": "0.22.6", - "changes": [ - { - "note": "Add a timeout parameter to transaction awaiting", - "pr": 206 - } - ], - "timestamp": 1510239600 - }, - { - "version": "0.22.5", - "changes": [ - { - "note": "Re-publish v0.22.4 to fix publishing issue" - } - ], - "timestamp": 1509980400 - }, - { - "version": "0.22.4", - "changes": [ - { - "note": "Upgraded bignumber.js to a new version that ships with native typings" - } - ], - "timestamp": 1508857200 - }, - { - "version": "0.22.3", - "changes": [ - { - "note": "Fixed an issue with new version of testrpc and unlimited proxy allowance", - "pr": 199 - } - ], - "timestamp": 1508857200 - }, - { - "version": "0.22.2", - "changes": [ - { - "note": "Fixed rounding of maker fill amount and incorrect validation of partial fees", - "pr": 197 - } - ], - "timestamp": 1508770800 - }, - { - "version": "0.22.0", - "changes": [ - { - "note": "Started using `OrderFillRequest` interface instead of `OrderFillOrKillRequest` interface for `zeroEx.exchange.batchFillOrKill`", - "pr": 187 - }, - { - "note": "Removed `OrderFillOrKillRequest`", - "pr": 187 - } - ], - "timestamp": 1508079600 - }, - { - "version": "0.21.4", - "changes": [ - { - "note": "Made 0x.js more type-safe by making `getLogsAsync` and `subscribe/subscribeAsync` generics parametrized with arg type", - "pr": 194 - } - ], - "timestamp": 1507820400 - }, - { - "version": "0.21.3", - "changes": [ - { - "note": "Fixed a bug causing order fills to throw `INSUFFICIENT_TAKER_ALLOWANCE`", - "pr": 193 - } - ], - "timestamp": 1507734000 - }, - { - "version": "0.21.2", - "changes": [ - { - "note": "Exported `ContractEventArg` as a public type", - "pr": 190 - } - ], - "timestamp": 1507647600 - }, - { - "version": "0.21.1", - "changes": [ - { - "note": "Fixed a bug in subscriptions", - "pr": 189 - } - ], - "timestamp": 1507647600 - }, - { - "version": "0.21.0", - "changes": [ - { - "note": "Complete rewrite of subscription logic", - "pr": 182 - }, - { - "note": "Subscriptions no longer return historical logs. If you want them - use `getLogsAsync`" - }, - { - "note": "Subscriptions now use [ethereumjs-blockstream](https://github.com/ethereumjs/ethereumjs-blockstream) under the hood" - }, - { - "note": "Subscriptions correctly handle block re-orgs (forks)" - }, - { - "note": "Subscriptions correctly backfill logs (connection problems)" - }, - { - "note": "They no longer setup filters on the underlying nodes, so you can use them with infura without a filter Subprovider" - }, - { - "note": "Removed `ContractEventEmitter` and added `LogEvent`" - }, - { - "note": "Renamed `zeroEx.token.subscribeAsync` to `zeroEx.token.subscribe`" - }, - { - "note": "Added `zeroEx.token.unsubscribe` and `zeroEx.exchange.unsubscribe`" - }, - { - "note": "Renamed `zeroEx.exchange.stopWatchingAllEventsAsync` to `zeroEx.exhange.unsubscribeAll`" - }, - { - "note": "Renamed `zeroEx.token.stopWatchingAllEventsAsync` to `zeroEx.token.unsubscribeAll`" - }, - { - "note": "Fixed the batch fills validation by emulating all balance & proxy allowance changes", - "pr": 185 - } - ], - "timestamp": 1507561200 - }, - { - "version": "0.20.0", - "changes": [ - { - "note": "Add `zeroEx.token.getLogsAsync`", - "pr": 178 - }, - { - "note": "Add `zeroEx.exchange.getLogsAsync`", - "pr": 178 - }, - { - "note": "Fixed fees validation when one of the tokens transferred is ZRX", - "pr": 181 - } - ], - "timestamp": 1507129200 - }, - { - "version": "0.19.0", - "changes": [ - { - "note": "Made order validation optional ", - "pr": 172 - }, - { - "note": "Added Ropsten testnet support", - "pr": 173 - }, - { - "note": "Fixed a bug causing awaitTransactionMinedAsync to DDos backend nodes", - "pr": 175 - } - ], - "timestamp": 1506610800 - }, - { - "version": "0.18.0", - "changes": [ - { - "note": "Added `zeroEx.exchange.validateOrderFillableOrThrowAsync` to simplify orderbook pruning", - "pr": 170 - } - ], - "timestamp": 1506351600 - }, - { - "version": "0.17.0", - "changes": [ - { - "note": "Made `zeroEx.exchange.getZRXTokenAddressAsync` public", - "pr": 171 - } - ], - "timestamp": 1506351600 - }, - { - "version": "0.16.0", - "changes": [ - { - "note": "Added the ability to specify custom contract addresses to be used with 0x.js", - "pr": 165 - }, - { - "note": "ZeroExConfig.exchangeContractAddress" - }, - { - "note": "ZeroExConfig.tokenRegistryContractAddress" - }, - { - "note": "ZeroExConfig.etherTokenContractAddress" - }, - { - "note": "Added `zeroEx.tokenRegistry.getContractAddressAsync`", - "pr": 165 - } - ], - "timestamp": 1505833200 - }, - { - "version": "0.15.0", - "changes": [ - { - "note": "Added the ability to specify a historical `blockNumber` at which to query the blockchain's state when calling a token or exchange method", - "pr": 161 - } - ], - "timestamp": 1504796400 - }, - { - "version": "0.14.2", - "changes": [ - { - "note": "Fixed an issue with bignumber.js types not found", - "pr": 160 - } - ], - "timestamp": 1504710000 - }, - { - "version": "0.14.1", - "changes": [ - { - "note": "Fixed an issue with Artifact type not found", - "pr": 159 - } - ], - "timestamp": 1504710000 - }, - { - "version": "0.14.0", - "changes": [ - { - "note": "Added `zeroEx.exchange.throwLogErrorsAsErrors` method to public interface", - "pr": 157 - }, - { - "note": "Fixed an issue with overlapping async intervals in `zeroEx.awaitTransactionMinedAsync`", - "pr": 157 - }, - { - "note": "Fixed an issue with log decoder returning `BigNumber`s as `strings`", - "pr": 157 - } - ], - "timestamp": 1504623600 - }, - { - "version": "0.13.0", - "changes": [ - { - "note": "Made all the functions submitting transactions to the network to immediately return transaction hash", - "pr": 151 - }, - { - "note": "Added `zeroEx.awaitTransactionMinedAsync`", - "pr": 151 - }, - { - "note": "Added `TransactionReceiptWithDecodedLogs`, `LogWithDecodedArgs`, `DecodedLogArgs` to public types", - "pr": 151 - }, - { - "note": "Added signature validation to `validateFillOrderThrowIfInvalidAsync`", - "pr": 152 - } - ], - "timestamp": 1504623600 - }, - { - "version": "0.12.1", - "changes": [ - { - "note": "Added the support for web3@1.x.x provider", - "pr": 142 - }, - { - "note": "Added the optional `zeroExConfig` parameter to the constructor of `ZeroEx`", - "pr": 139 - }, - { - "note": "Added the ability to specify `gasPrice` when instantiating `ZeroEx`", - "pr": 139 - } - ], - "timestamp": 1504278000 - }, - { - "version": "0.11.0", - "changes": [ - { - "note": "Added `zeroEx.token.setUnlimitedProxyAllowanceAsync`", - "pr": 137 - }, - { - "note": "Added `zeroEx.token.setUnlimitedAllowanceAsync`", - "pr": 137 - }, - { - "note": "Added `zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS`", - "pr": 137 - } - ], - "timestamp": 1503500400 - }, - { - "version": "0.10.4", - "changes": [ - { - "note": "Fixed a bug where checksummed addresses were being pulled from artifacts and not lower-cased.", - "pr": 135 - } - ], - "timestamp": 1503500400 - }, - { - "version": "0.10.1", - "changes": [ - { - "note": "Added `zeroEx.exchange.validateFillOrderThrowIfInvalidAsync`", - "pr": 128 - }, - { - "note": "Added `zeroEx.exchange.validateFillOrKillOrderThrowIfInvalidAsync`", - "pr": 128 - }, - { - "note": "Added `zeroEx.exchange.validateCancelOrderThrowIfInvalidAsync`", - "pr": 128 - }, - { - "note": "Added `zeroEx.exchange.isRoundingErrorAsync`", - "pr": 128 - }, - { - "note": "Added `zeroEx.proxy.getContractAddressAsync`", - "pr": 130 - }, - { - "note": "Added `zeroEx.tokenRegistry.getTokenAddressesAsync`", - "pr": 132 - }, - { - "note": "Added `zeroEx.tokenRegistry.getTokenAddressBySymbolIfExistsAsync`", - "pr": 132 - }, - { - "note": "Added `zeroEx.tokenRegistry.getTokenAddressByNameIfExistsAsync`", - "pr": 132 - }, - { - "note": "Added `zeroEx.tokenRegistry.getTokenBySymbolIfExistsAsync`", - "pr": 132 - }, - { - "note": "Added `zeroEx.tokenRegistry.getTokenByNameIfExistsAsync`", - "pr": 132 - }, - { - "note": "Added clear error message when checksummed address is passed to a public method", - "pr": 124 - }, - { - "note": "Fixes the description of `shouldThrowOnInsufficientBalanceOrAllowance` in docs", - "pr": 127 - } - ], - "timestamp": 1503500400 - }, - { - "version": "0.9.3", - "changes": [ - { - "note": "Update contract artifacts to include latest Kovan and Mainnet deploys", - "pr": 118 - } - ], - "timestamp": 1503327600 - }, - { - "version": "0.9.2", - "changes": [ - { - "note": "*This version was unpublished because of a publishing issue.*" - }, - { - "note": "Update contract artifacts to include latest Kovan and Mainnet deploys", - "pr": 118 - } - ], - "timestamp": 1503241200 - }, - { - "version": "0.9.1", - "changes": [ - { - "note": "Fixed the bug causing `zeroEx.token.getBalanceAsync()` to fail if no addresses available", - "pr": 120 - } - ], - "timestamp": 1502809200 - }, - { - "version": "0.9.0", - "changes": [ - { - "note": "Migrated to the new version of smart contracts", - "pr": 101 - }, - { - "note": "Removed the ability to call methods on multiple authorized Exchange smart contracts", - "pr": 106 - }, - { - "note": "Made `zeroEx.getOrderHashHex` a static method", - "pr": 107 - }, - { - "note": "Cached `net_version` requests and invalidate the cache on calls to `setProvider`", - "pr": 95 - }, - { - "note": "Renamed `zeroEx.exchange.batchCancelOrderAsync` to `zeroEx.exchange.batchCancelOrdersAsync`" - }, - { - "note": "Renamed `zeroEx.exchange.batchFillOrderAsync` to `zeroEx.exchange.batchFillOrdersAsync`" - }, - { - "note": "Updated to typescript v2.4", - "pr": 104 - }, - { - "note": "Fixed an issue with incorrect balance/allowance validation when ZRX is one of the tokens traded", - "pr": 109 - } - ], - "timestamp": 1500994800 - }, - { - "version": "0.8.0", - "changes": [ - { - "note": "Added the ability to call methods on different authorized versions of the Exchange smart contract", - "pr": 82 - }, - { - "note": "Updated contract artifacts to reflect latest changes to the smart contracts (0xproject/contracts#59)" - }, - { - "note": "Added `zeroEx.proxy.isAuthorizedAsync` and `zeroEx.proxy.getAuthorizedAddressesAsync`", - "pr": 89 - }, - { - "note": "Added `zeroEx.token.subscribeAsync`", - "pr": 90 - }, - { - "note": "Made contract invalidation functions private", - "pr": 90 - }, - { - "note": "`zeroEx.token.invalidateContractInstancesAsync`" - }, - { - "note": "`zeroEx.exchange.invalidateContractInstancesAsync`" - }, - { - "note": "`zeroEx.proxy.invalidateContractInstance`" - }, - { - "note": "`zeroEx.tokenRegistry.invalidateContractInstance`" - }, - { - "note": "Fixed the bug where `zeroEx.setProviderAsync` didn't invalidate etherToken contract's instance" - } - ], - "timestamp": 1499094000 - }, - { - "version": "0.7.1", - "changes": [ - { - "note": "Added the ability to convert Ether to wrapped Ether tokens and back via `zeroEx.etherToken.depostAsync` and `zeroEx.etherToken.withdrawAsync`", - "pr": 81 - } - ], - "timestamp": 1498402800 - }, - { - "version": "0.7.0", - "changes": [ - { - "note": "Added Kovan smart contract artifacts", - "pr": 78 - }, - { - "note": "Started returning fillAmount from `fillOrderAsync` and `fillUpToAsync`", - "pr": 72 - }, - { - "note": "Started returning cancelledAmount from `cancelOrderAsync`", - "pr": 72 - }, - { - "note": "Renamed type `LogCancelArgs` to `LogCancelContractEventArgs` and `LogFillArgs` to `LogFillContractEventArgs`" - } - ], - "timestamp": 1498057200 - }, - { - "version": "0.6.2", - "changes": [ - { - "note": "Reduced bundle size" - }, - { - "note": "Improved documentation" - } - ], - "timestamp": 1497970800 - }, - { - "version": "0.6.1", - "changes": [ - { - "note": "Improved documentation" - } - ], - "timestamp": 1497798000 - }, - { - "version": "0.6.0", - "changes": [ - { - "note": "Made `ZeroEx` class accept `Web3Provider` instance instead of `Web3` instance" - }, - { - "note": "Added types for contract event arguments" - } - ], - "timestamp": 1497798000 - }, - { - "version": "0.5.2", - "changes": [ - { - "note": "Fixed the bug in `postpublish` script that caused that only unminified UMD bundle was uploaded to release page" - } - ], - "timestamp": 1497452400 - }, - { - "version": "0.5.1", - "changes": [ - { - "note": "Added `postpublish` script to publish to Github Releases with assets." - } - ], - "timestamp": 1497452400 - } -] diff --git a/packages/0x.js/CHANGELOG.md b/packages/0x.js/CHANGELOG.md deleted file mode 100644 index b0279f097..000000000 --- a/packages/0x.js/CHANGELOG.md +++ /dev/null @@ -1,531 +0,0 @@ - - -CHANGELOG - -## v3.0.3 - _January 17, 2019_ - - * Dependencies updated - -## v3.0.2 - _January 15, 2019_ - - * Dependencies updated - -## v3.0.1 - _January 11, 2019_ - - * Dependencies updated - -## v3.0.0 - _January 9, 2019_ - - * Export `MultiAssetData`, `MultiAssetDataWithRecursiveDecoding`, `ObjectMap`, and `SingleAssetData` from types. No longer export `AssetData`. (#1363) - -## v2.0.8 - _December 13, 2018_ - - * Dependencies updated - -## v2.0.7 - _December 11, 2018_ - - * Dependencies updated - -## v2.0.6 - _November 28, 2018_ - - * Dependencies updated - -## v2.0.5 - _November 21, 2018_ - - * Dependencies updated - -## v2.0.4 - _November 14, 2018_ - - * Dependencies updated - -## v2.0.3 - _November 13, 2018_ - - * Dependencies updated - -## v2.0.2 - _November 12, 2018_ - - * Dependencies updated - -## v2.0.1 - _November 9, 2018_ - - * Dependencies updated - -## v2.0.0 - _October 18, 2018_ - - * Add support for `eth_signTypedData`. (#1102) - * Added `MetamaskSubprovider` to handle inconsistencies in Metamask's signing JSON RPC endpoints. (#1102) - * Removed `SignerType` (including `SignerType.Metamask`). Please use the `MetamaskSubprovider` to wrap `web3.currentProvider`. (#1102) - * Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers (#1105) - * Make web3-provider-engine types a 'dependency' so it's available to users of the library (#1105) - * Export new `AssetData` type from types (#1131) - -## v1.0.8 - _October 4, 2018_ - - * Dependencies updated - -## v1.0.7 - _September 28, 2018_ - - * Dependencies updated - -## v1.0.6 - _September 25, 2018_ - - * Dependencies updated - -## v1.0.5 - _September 25, 2018_ - - * Dependencies updated - -## v1.0.4 - _September 21, 2018_ - - * Dependencies updated - -## v1.0.3 - _September 19, 2018_ - - * Drastically reduce the bundle size by removing unused parts of included contract artifacts. - -## v1.0.2 - _September 18, 2018_ - - * Add ZRX & WETH mainnet contract addresses into the included artifacts - -## v1.0.1 - _September 5, 2018_ - - * Dependencies updated - -## v1.0.1-rc.6 - _August 27, 2018_ - - * Fix missing `BlockParamLiteral` type import issue - -## v1.0.1-rc.5 - _Invalid date_ - - * Fix `main` and `types` package.json entries so that they point to the new location of index.d.ts and index.js - -## v1.0.1-rc.4 - _August 24, 2018_ - - * Re-organize the exported interface of 0x.js. Remove the `ZeroEx` class, and instead export the same exports as `0x.js`'s sub-packages: `@0xproject/contract-wrappers`, `@0xproject/order-utils` and `@0xproject/order-watcher` (#963) - -## v1.0.1-rc.3 - _August 14, 2018_ - - * Dependencies updated - * Update ecSignOrderHashAsync to return the signature as a string for immediate use in contracts (#914) - -## v1.0.1-rc.2 - _July 26, 2018_ - - * Fixed bug caused by importing non-existent dep - -## v1.0.1-rc.1 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.0 - _July 23, 2018_ - - * Dependencies updated - -## v1.0.0-rc.2 - _July 19, 2018_ - - * Remove `zeroEx.assetData` and instead re-export it's static functions directly off `ZeroEx` - -## v1.0.0-rc.1 - _July 19, 2018_ - - * Remove tokenRegistry wrapper (#863) - * Rename `zeroEx.token` to `zeroEx.erc20Token`, and add `zeroEx.erc721Token` (#863) - * Rename `zeroEx.proxy` to `zeroEx.erc20Proxy` and add `zeroEx.erc721Proxy` (#863) - * Refactored `ZeroEx.isValidSignature` to `zeroEx.isValidSignatureAsync`. It is now async so that it can verify contract-dependent signature types (#863) - * Refactored `signOrderHashAsync` to `ecSignOrderHashAsync`. There are now many non-ECSignature ways to sign orders too. (#863) - * Removed `createOrderWatcherAsync` method. Will be added back once OrderWatcher is refactored for V2 (#863) - * 0x.js exports renamed contract events and event arg types (#863) - * Export `ZeroEx.assetData` with methods to decode/encode assetData fields found in 0x orders (#884) - -## v0.38.6 - _July 18, 2018_ - - * Dependencies updated - -## v0.38.5 - _July 9, 2018_ - - * Dependencies updated - -## v0.38.4 - _June 19, 2018_ - - * Dependencies updated - -## v0.38.3 - _May 29, 2018_ - - * Dependencies updated - -## v0.38.2 - _May 29, 2018_ - - * Dependencies updated - -## v0.38.1 - _May 29, 2018_ - - * Dependencies updated - -## v0.38.0 - _May 22, 2018_ - - * Renamed createOrderStateWatcher to createOrderWatcherAsync since it is now async (#579) - * Renamed ZeroExError to ContractWrappersErrors since they now lives in the @0xproject/contract-wrappers subpackage (#579) - -## v0.37.2 - _May 4, 2018_ - - * Dependencies updated - -## v0.37.1 - _May 4, 2018_ - - * Dependencies updated - -## v0.37.0 - _May 4, 2018_ - - * Fixed expiration watcher comparator to handle orders with equal expiration times (#526) - * Update Web3 Provider Engine to 14.0.4 (#555) - * Add `zeroEx.getProvider()` (#559) - * Move `ZeroExError.InvalidSignature` to `@0xproject/order-utils` `OrderError.InvalidSignature` (#559) - -## v0.36.3 - _April 18, 2018_ - - * Move @0xproject/migrations to devDependencies - -## v0.36.2 - _April 18, 2018_ - - * Dependencies updated - -## v0.36.1 - _April 18, 2018_ - - * Internal changes and refactoring - * Fix redundant expired order removal bug (#527) - -## v0.36.0 - _April 11, 2018_ - - * Moved Web3.Provider to `@0xproject/types:Provider` (#501) - * Add `zeroEx.exchange.getOrderStateAsync` to allow obtaining current OrderState for a signedOrder (#510) - -## v0.35.0 - _April 2, 2018_ - - * Removed `ZeroExError.TransactionMiningTimeout` and moved it to '@0xproject/web3-wrapper' `Web3WrapperErrors.TransactionMiningTimeout` (#485) - -## v0.34.0 - _April 2, 2018_ - - * Fix the bug causing `zeroEx.exchange.fillOrdersUpToAsync` validation to fail if there were some extra orders passed (#470) - * Remove automatic instantiation of `zeroEx.orderStateWatcher` (#488) - * Add `zeroEx.createOrderStateWatcher` to allow creating arbitrary number of OrderStateWatchers (#488) - * Added `stateLayer` setting to `OrderStateWatcherConfig` so OrderStateWatcher can be set to monitor different blockchain state layers (#488) - -## v0.33.2 - _March 17, 2018_ - - * Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package (#452) - * Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package (#456) - -## v0.33.1 - _March 7, 2018_ - - * Add missing EthersJs typescript typings as dependency - -## v0.33.0 - _March 3, 2018_ - - * Validate and lowercase all addresses in public methods (#373) - * Improve validation to force passing contract addresses on private networks (#385) - * Change `LogErrorContractEventArgs.errorId` type from `BigNumber` to `number` (#413) - * Rename all public `_unsubscribeAll` methods to `unsubscribeAll` (#415) - * Move web3 typings from devDep to dep since cannot use this package without it (#429) - -## v0.32.2 - _February 8, 2018_ - - * Fix publishing issue where .npmignore was not properly excluding undesired content (#389) - -## v0.32.1 - _February 6, 2018_ - - * Reorganized `BlockParamLiteral` export into `@0xproject/types` package (#355) - * Now using `abi-gen` package to generate ContractEventArgs types (#371) - -## v0.32.0 - _February 4, 2018_ - - * Add `zeroEx.etherToken.getContractAddressIfExists` (#350) - * Fixed the bug causing order watcher to throw if there is an event with the same signature but different indexed fields (#366) - -## v0.31.1 - _January 31, 2018_ - - * Fix the bug causing order watcher to throw if makerToken === zrx (#357) - -## v0.31.0 - _January 29, 2018_ - - * Add the `shouldAddPersonalMessagePrefix` parameter to `signOrderHashAsync` so that the caller can decide on whether to add the personalMessage prefix before relaying the request to the signer. Parity Signer, Ledger and TestRPC add the prefix themselves, Metamask expects it to have already been added. (#349) - -## v0.30.2 - _January 28, 2018_ - - * Add Rinkeby testnet addresses to artifacts (#337) - * Move @0xproject/types to dependencies from devDependencies fixing missing type errors - -## v0.30.1 - _January 23, 2018_ - - * Fix a bug allowing negative fill values (#212) - * Fix a bug that made it impossible to pass a custom ZRX address (#341) - -## v0.30.0 - _January 16, 2018_ - - * Add an error parameter to the order watcher callback (#312) - * Fix a bug making it impossible to catch some errors from awaitTransactionMinedAsync (#312) - * Fix a bug in fillOrdersUpTo validation making it impossible to fill up to if user doesn't have enough balance to fully fill all the orders (#321) - -## v0.29.1 - _January 10, 2018_ - - * Fixed bignumber config issue #301 (#305) - -## v0.29.0 - _December 27, 2017_ - - * Assert baseUnit amount supplied to `toUnitAmount` is integer amount. (#287) - * `toBaseUnitAmount` throws if amount supplied has too many decimals (#287) - -## v0.28.0 - _December 19, 2017_ - - * Add `etherTokenAddress` arg to `depositAsync` and `withdrawAsync` methods on `zeroEx.etherToken` (#267) - * Removed accidentally included `unsubscribeAll` method from `zeroEx.proxy`, `zeroEx.etherToken` and `zeroEx.tokenRegistry` (#267) - * Removed `etherTokenContractAddress` from `ZeroEx` constructor arg `ZeroExConfig` (#267) - * Rename `SubscriptionOpts` to `BlockRange` (#272) - * Add `zeroEx.etherToken.subscribe`, `zeroEx.etherToken.unsubscribe`, `zeroEx.etherToken.unsubscribeAll` (#277) - * Add `zeroEx.etherToken.getLogsAsync` (#277) - * Add new public types `BlockParamLiteral`, `EtherTokenEvents`, `EtherTokenContractEventArgs`, `DepositContractEventArgs`, `WithdrawalContractEventArgs` (#277) - * Support `Deposit` and `Withdraw` events on etherToken (#277) - * Improve the error message when taker is not a string (#278) - -## v0.27.1 - _November 27, 2017_ - - * Export `TransactionOpts` type - -## v0.27.0 - _November 27, 2017_ - - * Make `ZeroExConfig` required parameter of `ZeroEx` constructor (#233) - * Add a required property `networkId` to `ZeroExConfig` (#233) - * Make all `getContractAddress` functions, `zeroEx.exchange.subscribe`, `zeroEx.exchange.getZRXTokenAddress` sync (#233) - * Remove `ZeroExError.ContractNotFound` and replace it with contract-specific errors (#233) - * Make `DecodedLogEvent` contain `LogWithDecodedArgs` under log key instead of merging it in like web3 does (#234) - * Rename `removed` to `isRemoved` in `DecodedLogEvent` (#234) - * Add config allowing to specify gasPrice and gasLimit for every transaction sending method (#235) - * All transaction sending methods now call `estimateGas` if no gas amount was supplied (#235) - * Modify order validation methods to validate against the `latest` block, not against the `pending` block (#236) - -## v0.26.0 - _November 20, 2017_ - - * Add post-formatter for logs converting `blockNumber`, `logIndex`, `transactionIndex` from hexes to numbers (#231) - * Remove support for Async callback types when used in Subscribe functions (#222) - * In OrderWatcher subscribe to ZRX Token Transfer and Approval events when maker token is different (#225) - -## v0.25.1 - _November 12, 2017_ - - * Standardise on Cancelled over Canceled (#217) - * Add missing `DecodedLogEvent` type to exported types (#205) - * Normalized the transactionReceipt status to be `null|0|1`, 1 meaning transaction execution successful, 0 unsuccessful and `null` if it is a pre-byzantinium transaction. (#200) - -## v0.23.0 - _November 11, 2017_ - - * Fixed unhandled promise rejection error in subscribe methods (#209) - * Subscribe callbacks now receive an error object as their first argument - -## v0.22.6 - _November 9, 2017_ - - * Add a timeout parameter to transaction awaiting (#206) - -## v0.22.5 - _November 6, 2017_ - - * Re-publish v0.22.4 to fix publishing issue - -## v0.22.4 - _October 24, 2017_ - - * Upgraded bignumber.js to a new version that ships with native typings - -## v0.22.3 - _October 24, 2017_ - - * Fixed an issue with new version of testrpc and unlimited proxy allowance (#199) - -## v0.22.2 - _October 23, 2017_ - - * Fixed rounding of maker fill amount and incorrect validation of partial fees (#197) - -## v0.22.0 - _October 15, 2017_ - - * Started using `OrderFillRequest` interface instead of `OrderFillOrKillRequest` interface for `zeroEx.exchange.batchFillOrKill` (#187) - * Removed `OrderFillOrKillRequest` (#187) - -## v0.21.4 - _October 12, 2017_ - - * Made 0x.js more type-safe by making `getLogsAsync` and `subscribe/subscribeAsync` generics parametrized with arg type (#194) - -## v0.21.3 - _October 11, 2017_ - - * Fixed a bug causing order fills to throw `INSUFFICIENT_TAKER_ALLOWANCE` (#193) - -## v0.21.2 - _October 10, 2017_ - - * Exported `ContractEventArg` as a public type (#190) - -## v0.21.1 - _October 10, 2017_ - - * Fixed a bug in subscriptions (#189) - -## v0.21.0 - _October 9, 2017_ - - * Complete rewrite of subscription logic (#182) - * Subscriptions no longer return historical logs. If you want them - use `getLogsAsync` - * Subscriptions now use [ethereumjs-blockstream](https://github.com/ethereumjs/ethereumjs-blockstream) under the hood - * Subscriptions correctly handle block re-orgs (forks) - * Subscriptions correctly backfill logs (connection problems) - * They no longer setup filters on the underlying nodes, so you can use them with infura without a filter Subprovider - * Removed `ContractEventEmitter` and added `LogEvent` - * Renamed `zeroEx.token.subscribeAsync` to `zeroEx.token.subscribe` - * Added `zeroEx.token.unsubscribe` and `zeroEx.exchange.unsubscribe` - * Renamed `zeroEx.exchange.stopWatchingAllEventsAsync` to `zeroEx.exhange.unsubscribeAll` - * Renamed `zeroEx.token.stopWatchingAllEventsAsync` to `zeroEx.token.unsubscribeAll` - * Fixed the batch fills validation by emulating all balance & proxy allowance changes (#185) - -## v0.20.0 - _October 4, 2017_ - - * Add `zeroEx.token.getLogsAsync` (#178) - * Add `zeroEx.exchange.getLogsAsync` (#178) - * Fixed fees validation when one of the tokens transferred is ZRX (#181) - -## v0.19.0 - _September 28, 2017_ - - * Made order validation optional (#172) - * Added Ropsten testnet support (#173) - * Fixed a bug causing awaitTransactionMinedAsync to DDos backend nodes (#175) - -## v0.18.0 - _September 25, 2017_ - - * Added `zeroEx.exchange.validateOrderFillableOrThrowAsync` to simplify orderbook pruning (#170) - -## v0.17.0 - _September 25, 2017_ - - * Made `zeroEx.exchange.getZRXTokenAddressAsync` public (#171) - -## v0.16.0 - _September 19, 2017_ - - * Added the ability to specify custom contract addresses to be used with 0x.js (#165) - * ZeroExConfig.exchangeContractAddress - * ZeroExConfig.tokenRegistryContractAddress - * ZeroExConfig.etherTokenContractAddress - * Added `zeroEx.tokenRegistry.getContractAddressAsync` (#165) - -## v0.15.0 - _September 7, 2017_ - - * Added the ability to specify a historical `blockNumber` at which to query the blockchain's state when calling a token or exchange method (#161) - -## v0.14.2 - _September 6, 2017_ - - * Fixed an issue with bignumber.js types not found (#160) - -## v0.14.1 - _September 6, 2017_ - - * Fixed an issue with Artifact type not found (#159) - -## v0.14.0 - _September 5, 2017_ - - * Added `zeroEx.exchange.throwLogErrorsAsErrors` method to public interface (#157) - * Fixed an issue with overlapping async intervals in `zeroEx.awaitTransactionMinedAsync` (#157) - * Fixed an issue with log decoder returning `BigNumber`s as `strings` (#157) - -## v0.13.0 - _September 5, 2017_ - - * Made all the functions submitting transactions to the network to immediately return transaction hash (#151) - * Added `zeroEx.awaitTransactionMinedAsync` (#151) - * Added `TransactionReceiptWithDecodedLogs`, `LogWithDecodedArgs`, `DecodedLogArgs` to public types (#151) - * Added signature validation to `validateFillOrderThrowIfInvalidAsync` (#152) - -## v0.12.1 - _September 1, 2017_ - - * Added the support for web3@1.x.x provider (#142) - * Added the optional `zeroExConfig` parameter to the constructor of `ZeroEx` (#139) - * Added the ability to specify `gasPrice` when instantiating `ZeroEx` (#139) - -## v0.11.0 - _August 23, 2017_ - - * Added `zeroEx.token.setUnlimitedProxyAllowanceAsync` (#137) - * Added `zeroEx.token.setUnlimitedAllowanceAsync` (#137) - * Added `zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS` (#137) - -## v0.10.4 - _August 23, 2017_ - - * Fixed a bug where checksummed addresses were being pulled from artifacts and not lower-cased. (#135) - -## v0.10.1 - _August 23, 2017_ - - * Added `zeroEx.exchange.validateFillOrderThrowIfInvalidAsync` (#128) - * Added `zeroEx.exchange.validateFillOrKillOrderThrowIfInvalidAsync` (#128) - * Added `zeroEx.exchange.validateCancelOrderThrowIfInvalidAsync` (#128) - * Added `zeroEx.exchange.isRoundingErrorAsync` (#128) - * Added `zeroEx.proxy.getContractAddressAsync` (#130) - * Added `zeroEx.tokenRegistry.getTokenAddressesAsync` (#132) - * Added `zeroEx.tokenRegistry.getTokenAddressBySymbolIfExistsAsync` (#132) - * Added `zeroEx.tokenRegistry.getTokenAddressByNameIfExistsAsync` (#132) - * Added `zeroEx.tokenRegistry.getTokenBySymbolIfExistsAsync` (#132) - * Added `zeroEx.tokenRegistry.getTokenByNameIfExistsAsync` (#132) - * Added clear error message when checksummed address is passed to a public method (#124) - * Fixes the description of `shouldThrowOnInsufficientBalanceOrAllowance` in docs (#127) - -## v0.9.3 - _August 21, 2017_ - - * Update contract artifacts to include latest Kovan and Mainnet deploys (#118) - -## v0.9.2 - _August 20, 2017_ - - * *This version was unpublished because of a publishing issue.* - * Update contract artifacts to include latest Kovan and Mainnet deploys (#118) - -## v0.9.1 - _August 15, 2017_ - - * Fixed the bug causing `zeroEx.token.getBalanceAsync()` to fail if no addresses available (#120) - -## v0.9.0 - _July 25, 2017_ - - * Migrated to the new version of smart contracts (#101) - * Removed the ability to call methods on multiple authorized Exchange smart contracts (#106) - * Made `zeroEx.getOrderHashHex` a static method (#107) - * Cached `net_version` requests and invalidate the cache on calls to `setProvider` (#95) - * Renamed `zeroEx.exchange.batchCancelOrderAsync` to `zeroEx.exchange.batchCancelOrdersAsync` - * Renamed `zeroEx.exchange.batchFillOrderAsync` to `zeroEx.exchange.batchFillOrdersAsync` - * Updated to typescript v2.4 (#104) - * Fixed an issue with incorrect balance/allowance validation when ZRX is one of the tokens traded (#109) - -## v0.8.0 - _July 3, 2017_ - - * Added the ability to call methods on different authorized versions of the Exchange smart contract (#82) - * Updated contract artifacts to reflect latest changes to the smart contracts (0xproject/contracts#59) - * Added `zeroEx.proxy.isAuthorizedAsync` and `zeroEx.proxy.getAuthorizedAddressesAsync` (#89) - * Added `zeroEx.token.subscribeAsync` (#90) - * Made contract invalidation functions private (#90) - * `zeroEx.token.invalidateContractInstancesAsync` - * `zeroEx.exchange.invalidateContractInstancesAsync` - * `zeroEx.proxy.invalidateContractInstance` - * `zeroEx.tokenRegistry.invalidateContractInstance` - * Fixed the bug where `zeroEx.setProviderAsync` didn't invalidate etherToken contract's instance - -## v0.7.1 - _June 25, 2017_ - - * Added the ability to convert Ether to wrapped Ether tokens and back via `zeroEx.etherToken.depostAsync` and `zeroEx.etherToken.withdrawAsync` (#81) - -## v0.7.0 - _June 21, 2017_ - - * Added Kovan smart contract artifacts (#78) - * Started returning fillAmount from `fillOrderAsync` and `fillUpToAsync` (#72) - * Started returning cancelledAmount from `cancelOrderAsync` (#72) - * Renamed type `LogCancelArgs` to `LogCancelContractEventArgs` and `LogFillArgs` to `LogFillContractEventArgs` - -## v0.6.2 - _June 20, 2017_ - - * Reduced bundle size - * Improved documentation - -## v0.6.1 - _June 18, 2017_ - - * Improved documentation - -## v0.6.0 - _June 18, 2017_ - - * Made `ZeroEx` class accept `Web3Provider` instance instead of `Web3` instance - * Added types for contract event arguments - -## v0.5.2 - _June 14, 2017_ - - * Fixed the bug in `postpublish` script that caused that only unminified UMD bundle was uploaded to release page - -## v0.5.1 - _June 14, 2017_ - - * Added `postpublish` script to publish to Github Releases with assets. diff --git a/packages/0x.js/README.md b/packages/0x.js/README.md deleted file mode 100644 index 5b7a2308c..000000000 --- a/packages/0x.js/README.md +++ /dev/null @@ -1,102 +0,0 @@ -## 0x.js - -A TypeScript/Javascript library for interacting with the 0x protocol. It is a high level package which combines a number of underlying packages such as order-utils and order-watcher. - -### Read the [Documentation](https://0xproject.com/docs/0x.js). - -## Installation - -0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package. - -#### CommonJS _(recommended)_: - -**Install** - -```bash -npm install 0x.js --save -``` - -**Import** - -```javascript -import { - assetDataUtils, - BigNumber, - ContractWrappers, - generatePseudoRandomSalt, - orderHashUtils, - signatureUtils, -} from '0x.js'; -``` - -If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: - -```json -"compilerOptions": { - "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], -} -``` - -#### UMD: - -**Install** - -Download the UMD module from our [releases page](https://github.com/0xProject/0x-monorepo/releases) and add it to your project. - -**Import** - -```html - -``` - -## Contributing - -We strongly recommend that the community help us make improvements and determine the future direction of 0x protocol. To report bugs within this package, please create an issue in this repository. - -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. - -### Install dependencies - -If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: - -```bash -yarn config set workspaces-experimental true -``` - -Then install dependencies - -```bash -yarn install -``` - -### Build - -To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: - -```bash -PKG=0x.js yarn build -``` - -Or continuously rebuild on change: - -```bash -PKG=0x.js yarn watch -``` - -### Clean - -```bash -yarn clean -``` - -### Lint - -```bash -yarn lint -``` - -### Run Tests - -```bash -yarn test -``` diff --git a/packages/0x.js/coverage/.gitkeep b/packages/0x.js/coverage/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json deleted file mode 100644 index 64054d288..000000000 --- a/packages/0x.js/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "0x.js", - "version": "3.0.3", - "engines": { - "node": ">=6.12" - }, - "description": "A javascript library for interacting with the 0x protocol", - "keywords": [ - "0x.js", - "0xproject", - "ethereum", - "tokens", - "exchange" - ], - "main": "lib/index.js", - "types": "lib/index.d.ts", - "scripts": { - "build": "yarn build:all", - "build:ci": "yarn build:commonjs", - "build:all": "run-p build:umd:prod build:commonjs", - "lint": "tslint --format stylish --project .", - "test:circleci": "run-s test:coverage", - "rebuild_and_test": "run-s build test", - "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", - "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "clean": "shx rm -rf _bundles lib test_temp src/generated_contract_wrappers generated_docs", - "build:umd:prod": "NODE_ENV=production webpack", - "build:commonjs": "tsc -b", - "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES" - }, - "config": { - "postpublish": { - "assets": [ - "packages/0x.js/_bundles/index.js", - "packages/0x.js/_bundles/index.min.js" - ] - } - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo" - }, - "license": "Apache-2.0", - "devDependencies": { - "@0x/abi-gen-wrappers": "^2.2.0", - "@0x/contract-addresses": "^2.2.0", - "@0x/dev-utils": "^1.0.24", - "@0x/migrations": "^2.4.0", - "@0x/tslint-config": "^2.0.2", - "@types/lodash": "4.14.104", - "@types/mocha": "^2.2.42", - "@types/node": "*", - "@types/sinon": "^2.2.2", - "awesome-typescript-loader": "^5.2.1", - "chai": "^4.0.1", - "chai-as-promised": "^7.1.0", - "chai-bignumber": "^3.0.0", - "copyfiles": "^2.0.0", - "dirty-chai": "^2.0.1", - "make-promises-safe": "^1.1.0", - "mocha": "^4.1.0", - "npm-run-all": "^4.1.2", - "nyc": "^11.0.1", - "opn-cli": "^3.1.0", - "shx": "^0.2.2", - "sinon": "^4.0.0", - "source-map-support": "^0.5.0", - "tslint": "5.11.0", - "typedoc": "0.13.0", - "typescript": "3.0.1", - "uglifyjs-webpack-plugin": "^2.0.1", - "webpack": "^4.20.2" - }, - "dependencies": { - "@0x/assert": "^1.0.23", - "@0x/base-contract": "^3.0.13", - "@0x/contract-wrappers": "^5.0.1", - "@0x/order-utils": "^3.1.2", - "@0x/order-watcher": "^2.4.3", - "@0x/subproviders": "^2.1.11", - "@0x/types": "^1.5.2", - "@0x/typescript-typings": "^3.0.8", - "@0x/utils": "^3.0.1", - "@0x/web3-wrapper": "^3.2.4", - "@types/web3-provider-engine": "^14.0.0", - "ethereum-types": "^1.1.6", - "ethers": "~4.0.4", - "lodash": "^4.17.5", - "web3-provider-engine": "14.0.6" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts deleted file mode 100644 index 006e4cf29..000000000 --- a/packages/0x.js/src/index.ts +++ /dev/null @@ -1,124 +0,0 @@ -export { ContractAddresses } from '@0x/contract-addresses'; - -export { assetDataUtils, signatureUtils, generatePseudoRandomSalt, orderHashUtils } from '@0x/order-utils'; - -export { - ContractWrappers, - DutchAuctionWrapper, - ERC20TokenWrapper, - ERC721TokenWrapper, - EtherTokenWrapper, - ExchangeWrapper, - ERC20ProxyWrapper, - ERC721ProxyWrapper, - ForwarderWrapper, - OrderValidatorWrapper, - IndexedFilterValues, - BlockRange, - ContractWrappersConfig, - MethodOpts, - OrderTransactionOpts, - TransactionOpts, - OrderStatus, - OrderInfo, - EventCallback, - DecodedLogEvent, - TransactionEncoder, - BalanceAndAllowance, - OrderAndTraderInfo, - TraderInfo, - ValidateOrderFillableOpts, - DutchAuctionData, -} from '@0x/contract-wrappers'; - -export { - WETH9Events, - WETH9WithdrawalEventArgs, - WETH9ApprovalEventArgs, - WETH9EventArgs, - WETH9DepositEventArgs, - WETH9TransferEventArgs, - ERC20TokenTransferEventArgs, - ERC20TokenApprovalEventArgs, - ERC20TokenEvents, - ERC20TokenEventArgs, - ERC721TokenApprovalEventArgs, - ERC721TokenApprovalForAllEventArgs, - ERC721TokenTransferEventArgs, - ERC721TokenEvents, - ERC721TokenEventArgs, - ExchangeCancelUpToEventArgs, - ExchangeAssetProxyRegisteredEventArgs, - ExchangeSignatureValidatorApprovalEventArgs, - ExchangeFillEventArgs, - ExchangeCancelEventArgs, - ExchangeEventArgs, - ExchangeEvents, -} from '@0x/abi-gen-wrappers'; - -export { OrderWatcher, OnOrderStateChangeCallback, OrderWatcherConfig } from '@0x/order-watcher'; - -export import Web3ProviderEngine = require('web3-provider-engine'); - -export { - RPCSubprovider, - Callback, - JSONRPCRequestPayloadWithMethod, - ErrorCallback, - MetamaskSubprovider, -} from '@0x/subproviders'; - -export { AbiDecoder } from '@0x/utils'; - -export { BigNumber } from '@0x/utils'; - -export { - ExchangeContractErrs, - Order, - SignedOrder, - ECSignature, - OrderStateValid, - OrderStateInvalid, - OrderState, - AssetProxyId, - AssetData, - SingleAssetData, - ERC20AssetData, - ERC721AssetData, - MultiAssetData, - MultiAssetDataWithRecursiveDecoding, - SignatureType, - ObjectMap, - OrderRelevantState, - Stats, - DutchAuctionDetails, -} from '@0x/types'; - -export { - BlockParamLiteral, - ContractAbi, - BlockParam, - LogWithDecodedArgs, - ContractEventArg, - Provider, - JSONRPCRequestPayload, - JSONRPCResponsePayload, - JSONRPCErrorCallback, - JSONRPCResponseError, - LogEntry, - DecodedLogArgs, - LogEntryEvent, - DecodedLogEntry, - DecodedLogEntryEvent, - RawLog, - AbiDefinition, - FunctionAbi, - EventAbi, - EventParameter, - MethodAbi, - ConstructorAbi, - FallbackAbi, - DataItem, - ConstructorStateMutability, - StateMutability, -} from 'ethereum-types'; diff --git a/packages/0x.js/tsconfig.json b/packages/0x.js/tsconfig.json deleted file mode 100644 index a96536716..000000000 --- a/packages/0x.js/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "lib", - "rootDir": "src" - }, - "include": ["./src/**/*"] -} diff --git a/packages/0x.js/tslint.json b/packages/0x.js/tslint.json deleted file mode 100644 index dd9053357..000000000 --- a/packages/0x.js/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@0x/tslint-config"] -} diff --git a/packages/0x.js/typedoc-tsconfig.json b/packages/0x.js/typedoc-tsconfig.json deleted file mode 100644 index a4c669cb6..000000000 --- a/packages/0x.js/typedoc-tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../typedoc-tsconfig", - "compilerOptions": { - "outDir": "lib" - }, - "include": ["./src/**/*"] -} diff --git a/packages/0x.js/webpack.config.js b/packages/0x.js/webpack.config.js deleted file mode 100644 index 397faa76f..000000000 --- a/packages/0x.js/webpack.config.js +++ /dev/null @@ -1,63 +0,0 @@ -/** - * This is to generate the umd bundle only - */ -const _ = require('lodash'); -const TerserPlugin = require('terser-webpack-plugin'); -const path = require('path'); -const production = process.env.NODE_ENV === 'production'; - -let entry = { - index: './src/index.ts', -}; -if (production) { - entry = _.assign({}, entry, { 'index.min': './src/index.ts' }); -} - -module.exports = { - entry, - mode: 'production', - output: { - path: path.resolve(__dirname, '_bundles'), - filename: '[name].js', - libraryTarget: 'umd', - library: 'ZeroEx', - umdNamedDefine: true, - }, - resolve: { - extensions: ['.ts', '.js', '.json'], - }, - devtool: 'source-map', - optimization: { - minimizer: [ - new TerserPlugin({ - sourceMap: true, - terserOptions: { - mangle: { - reserved: ['BigNumber'], - }, - }, - }), - ], - }, - module: { - rules: [ - { - test: /\.ts$/, - use: [ - { - loader: 'awesome-typescript-loader', - // tsconfig.json contains some options required for - // project references which do not work with webback. - // We override those options here. - query: { - declaration: false, - declarationMap: false, - composite: false, - }, - }, - ], - exclude: /node_modules/, - }, - ], - }, -}; diff --git a/packages/abi-gen-templates/CHANGELOG.json b/packages/abi-gen-templates/CHANGELOG.json deleted file mode 100644 index 7d444d0ca..000000000 --- a/packages/abi-gen-templates/CHANGELOG.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "version": "2.0.0", - "changes": [ - { - "note": "Upgrade the bignumber.js to v8.0.2", - "pr": 1517 - } - ] - }, - { - "timestamp": 1547561734, - "version": "1.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1543401373, - "version": "1.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "1.0.0", - "changes": [ - { - "note": "Initial publish", - "pr": 1305 - } - ] - } -] diff --git a/packages/abi-gen-templates/CHANGELOG.md b/packages/abi-gen-templates/CHANGELOG.md deleted file mode 100644 index 5dd6d03e0..000000000 --- a/packages/abi-gen-templates/CHANGELOG.md +++ /dev/null @@ -1,18 +0,0 @@ - - -CHANGELOG - -## v1.0.2 - _January 15, 2019_ - - * Dependencies updated - -## v1.0.1 - _November 28, 2018_ - - * Dependencies updated - -## v1.0.0 - _Invalid date_ - - * Initial publish (#1305) diff --git a/packages/abi-gen-templates/README.md b/packages/abi-gen-templates/README.md deleted file mode 100644 index 06c2e19cd..000000000 --- a/packages/abi-gen-templates/README.md +++ /dev/null @@ -1,17 +0,0 @@ -These templates are used with [abi-gen](https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen). - -To successfully compile the generated TypeScript contract wrappers, you must: - -- Install the packages on which the main contract template directly depends: `yarn add @0x/base-contract @0x/sol-compiler @0x/utils @0x/web3-wrapper ethereum-types ethers lodash` -- Install the packages on which the main contract template *in*directly depends: `yarn add @types/lodash` -- Ensure that your TypeScript configuration includes the following: - -``` -"compilerOptions": { - "lib": ["ES2015"], - "typeRoots": [ - "node_modules/@0x/typescript-typings/types", - "node_modules/@types" - ] -} -``` diff --git a/packages/abi-gen-templates/contract.handlebars b/packages/abi-gen-templates/contract.handlebars deleted file mode 100644 index 7e7171c70..000000000 --- a/packages/abi-gen-templates/contract.handlebars +++ /dev/null @@ -1,91 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - -{{#if events}} -export type {{contractName}}EventArgs = -{{#each events}} - | {{@root.contractName}}{{name}}EventArgs{{#if @last}};{{/if}} -{{/each}} - -export enum {{contractName}}Events { - {{#each events}} - {{name}} = '{{name}}', - {{/each}} -} - -{{#each events}} -{{> event}} - -{{/each}} -{{/if}} - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class {{contractName}}Contract extends BaseContract { -{{#each methods}} - {{#this.constant}} - {{> call contractName=../contractName}} - {{/this.constant}} - {{^this.constant}} - {{> tx contractName=../contractName}} - {{/this.constant}} -{{/each}} - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - {{> typed_params inputs=ctor.inputs}} - ): Promise<{{contractName}}Contract> { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return {{contractName}}Contract.deployAsync(bytecode, abi, provider, txDefaults, {{> params inputs=ctor.inputs}}); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - {{> typed_params inputs=ctor.inputs}} - ): Promise<{{contractName}}Contract> { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [{{> params inputs=ctor.inputs}}] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [{{> params inputs=ctor.inputs}}], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, [{{> params inputs=ctor.inputs}}]); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`{{contractName}} successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new {{contractName}}Contract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = [{{> params inputs=ctor.inputs}}]; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('{{contractName}}', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-templates/package.json b/packages/abi-gen-templates/package.json deleted file mode 100644 index af66aeba0..000000000 --- a/packages/abi-gen-templates/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@0x/abi-gen-templates", - "version": "1.0.2", - "engines": { - "node": ">=6.12" - }, - "description": "Handlebars templates used by abi-gen to generate contract-wrappers", - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo.git" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x-monorepo/issues" - }, - "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-templates/README.md", - "publishConfig": { - "access": "public" - } -} diff --git a/packages/abi-gen-templates/partials/call.handlebars b/packages/abi-gen-templates/partials/call.handlebars deleted file mode 100644 index 7c9c934c3..000000000 --- a/packages/abi-gen-templates/partials/call.handlebars +++ /dev/null @@ -1,3 +0,0 @@ -public {{this.tsName}} = { - {{> callAsync}} -}; diff --git a/packages/abi-gen-templates/partials/callAsync.handlebars b/packages/abi-gen-templates/partials/callAsync.handlebars deleted file mode 100644 index ab9f2c21c..000000000 --- a/packages/abi-gen-templates/partials/callAsync.handlebars +++ /dev/null @@ -1,23 +0,0 @@ -async callAsync( -{{> typed_params inputs=inputs}} - callData: Partial = {}, - defaultBlock?: BlockParam, -): Promise<{{> return_type outputs=outputs}}> { - const self = this as any as {{contractName}}Contract; - const encodedData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> params inputs=inputs}}]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('{{this.functionSignature}}'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{{> return_type outputs=outputs}}>(rawCallResult); - // tslint:enable boolean-naming - return result; -}, diff --git a/packages/abi-gen-templates/partials/event.handlebars b/packages/abi-gen-templates/partials/event.handlebars deleted file mode 100644 index 61d523ca2..000000000 --- a/packages/abi-gen-templates/partials/event.handlebars +++ /dev/null @@ -1,5 +0,0 @@ -export interface {{@root.contractName}}{{name}}EventArgs extends DecodedLogArgs { - {{#each inputs}} - {{name}}: {{#returnType type components}}{{/returnType}}; - {{/each}} -} diff --git a/packages/abi-gen-templates/partials/params.handlebars b/packages/abi-gen-templates/partials/params.handlebars deleted file mode 100644 index 2d9bb8ed9..000000000 --- a/packages/abi-gen-templates/partials/params.handlebars +++ /dev/null @@ -1,3 +0,0 @@ -{{#each inputs}} -{{name}}{{#if @last}}{{else}},{{/if}} -{{/each}} diff --git a/packages/abi-gen-templates/partials/return_type.handlebars b/packages/abi-gen-templates/partials/return_type.handlebars deleted file mode 100644 index 77d96e8c4..000000000 --- a/packages/abi-gen-templates/partials/return_type.handlebars +++ /dev/null @@ -1,10 +0,0 @@ -{{#if outputs.length}} -{{#singleReturnValue}} -{{#returnType outputs.0.type outputs.0.components}}{{/returnType}} -{{/singleReturnValue}} -{{^singleReturnValue}} -[{{#each outputs}}{{#returnType type components}}{{/returnType}}{{#unless @last}}, {{/unless}}{{/each}}] -{{/singleReturnValue}} -{{else}} -void -{{/if}} diff --git a/packages/abi-gen-templates/partials/tx.handlebars b/packages/abi-gen-templates/partials/tx.handlebars deleted file mode 100644 index 0f1027fae..000000000 --- a/packages/abi-gen-templates/partials/tx.handlebars +++ /dev/null @@ -1,53 +0,0 @@ -public {{this.tsName}} = { - async sendTransactionAsync( - {{> typed_params inputs=inputs}} - {{#this.payable}} - txData: Partial = {}, - {{/this.payable}} - {{^this.payable}} - txData: Partial = {}, - {{/this.payable}} - ): Promise { - const self = this as any as {{contractName}}Contract; - const encodedData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> params inputs=inputs}}]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.{{this.tsName}}.estimateGasAsync.bind( - self, - {{> params inputs=inputs}} - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - {{> typed_params inputs=inputs}} - txData: Partial = {}, - ): Promise { - const self = this as any as {{contractName}}Contract; - const encodedData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> params inputs=inputs}}]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - {{> typed_params inputs=inputs}} - ): string { - const self = this as any as {{contractName}}Contract; - const abiEncodedTransactionData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> params inputs=inputs}}]); - return abiEncodedTransactionData; - }, - {{> callAsync}} -}; diff --git a/packages/abi-gen-templates/partials/typed_params.handlebars b/packages/abi-gen-templates/partials/typed_params.handlebars deleted file mode 100644 index c100e58f7..000000000 --- a/packages/abi-gen-templates/partials/typed_params.handlebars +++ /dev/null @@ -1,3 +0,0 @@ -{{#each inputs}} - {{name}}: {{#parameterType type components}}{{/parameterType}}, -{{/each}} diff --git a/packages/abi-gen-wrappers/CHANGELOG.json b/packages/abi-gen-wrappers/CHANGELOG.json deleted file mode 100644 index c604302b5..000000000 --- a/packages/abi-gen-wrappers/CHANGELOG.json +++ /dev/null @@ -1,132 +0,0 @@ -[ - { - "version": "3.0.0", - "changes": [ - { - "note": "Upgrade the bignumber.js to v8.0.2", - "pr": 1517 - } - ] - }, - { - "version": "2.2.0", - "changes": [ - { - "note": "Added `MultiAssetProxy`", - "pr": 1503 - } - ], - "timestamp": 1547561734 - }, - { - "timestamp": 1547225310, - "version": "2.1.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "2.1.0", - "changes": [ - { - "note": "Added Dutch Auction Wrapper", - "pr": 1465 - } - ], - "timestamp": 1547040760 - }, - { - "version": "2.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544739608 - }, - { - "version": "2.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544570656 - }, - { - "version": "2.0.0", - "changes": [ - { - "pr": 1309, - "note": "Update Exchange artifact to receive ZRX asset data as a constructor argument" - } - ], - "timestamp": 1543401373 - }, - { - "version": "1.1.0", - "changes": [ - { - "note": "`deployFrom0xArtifactAsync` additionally accepts artifacts that conform to the `SimpleContractArtifact` interface", - "pr": 1298 - } - ], - "timestamp": 1542821676 - }, - { - "timestamp": 1542208198, - "version": "1.0.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542134075, - "version": "1.0.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542028948, - "version": "1.0.3", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "1.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1541740904 - }, - { - "timestamp": 1539871071, - "version": "1.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "1.0.0", - "changes": [ - { - "pr": 1105, - "note": "Initial release" - } - ] - } -] diff --git a/packages/abi-gen-wrappers/CHANGELOG.md b/packages/abi-gen-wrappers/CHANGELOG.md deleted file mode 100644 index 294f39439..000000000 --- a/packages/abi-gen-wrappers/CHANGELOG.md +++ /dev/null @@ -1,58 +0,0 @@ - - -CHANGELOG - -## v2.2.0 - _January 15, 2019_ - - * Added `MultiAssetProxy` (#1503) - -## v2.1.1 - _January 11, 2019_ - - * Dependencies updated - -## v2.1.0 - _January 9, 2019_ - - * Added Dutch Auction Wrapper (#1465) - -## v2.0.2 - _December 13, 2018_ - - * Dependencies updated - -## v2.0.1 - _December 11, 2018_ - - * Dependencies updated - -## v2.0.0 - _November 28, 2018_ - - * Update Exchange artifact to receive ZRX asset data as a constructor argument (#1309) - -## v1.1.0 - _November 21, 2018_ - - * `deployFrom0xArtifactAsync` additionally accepts artifacts that conform to the `SimpleContractArtifact` interface (#1298) - -## v1.0.5 - _November 14, 2018_ - - * Dependencies updated - -## v1.0.4 - _November 13, 2018_ - - * Dependencies updated - -## v1.0.3 - _November 12, 2018_ - - * Dependencies updated - -## v1.0.2 - _November 9, 2018_ - - * Dependencies updated - -## v1.0.1 - _October 18, 2018_ - - * Dependencies updated - -## v1.0.0 - _Invalid date_ - - * Initial release (#1105) diff --git a/packages/abi-gen-wrappers/README.md b/packages/abi-gen-wrappers/README.md deleted file mode 100644 index bcf58ae06..000000000 --- a/packages/abi-gen-wrappers/README.md +++ /dev/null @@ -1,73 +0,0 @@ -## @0x/abi-gen-wrappers - -Low-level 0x smart contract wrappers generated using @0x/abi-gen. These -low-level wrappers are imported by other packages in the 0x monorepo and -application developers are not expected to import this package directly. - -You may also be interested in the -[@0x/contract-wrappers](../contract-wrappers/README.md) package which -includes some higher-level features. - -## Installation - -```bash -yarn add @0x/abi-gen-wrappers -``` - -**Import** - -```typescript -import * as wrappers from '@0x/abi-gen-wrappers'; -``` - -or - -```javascript -var wrappers = require('@0x/abi-gen-wrappers'); -``` - -## Contributing - -We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. - -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. - -### Install dependencies - -If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: - -```bash -yarn config set workspaces-experimental true -``` - -Then install dependencies - -```bash -yarn install -``` - -### Build - -To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: - -```bash -PKG=@0x/abi-gen-wrappers yarn build -``` - -### Clean - -```bash -yarn clean -``` - -### Lint - -```bash -yarn lint -``` - -### Run Tests - -```bash -yarn test -``` diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json deleted file mode 100644 index 842ac024a..000000000 --- a/packages/abi-gen-wrappers/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "@0x/abi-gen-wrappers", - "version": "2.2.0", - "engines": { - "node": ">=6.12" - }, - "description": "Low-level 0x smart contract wrappers generated using @0x/abi-gen", - "main": "lib/src/index.js", - "directories": { - "test": "test" - }, - "scripts": { - "build": "yarn pre_build && tsc -b", - "build:ci": "yarn build", - "lint": "tslint --format stylish --project .", - "pre_build": "yarn generate_contract_wrappers", - "clean": "shx rm -rf lib wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output src/generated-wrappers --backend ethers" - }, - "config": { - "abis": "../contract-artifacts/artifacts/@(AssetProxyOwner|DutchAuction|DummyERC20Token|DummyERC721Token|ERC20Proxy|ERC20Token|ERC721Proxy|ERC721Token|Exchange|Forwarder|IValidator|IWallet|MultiAssetProxy|OrderValidator|WETH9|ZRXToken).json" - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo.git" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x-monorepo/issues" - }, - "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md", - "devDependencies": { - "@0x/abi-gen": "^1.0.22", - "@0x/abi-gen-templates": "^1.0.2", - "@0x/tslint-config": "^2.0.2", - "@0x/types": "^1.5.2", - "@0x/utils": "^3.0.1", - "@0x/web3-wrapper": "^3.2.4", - "ethereum-types": "^1.1.6", - "ethers": "~4.0.4", - "lodash": "^4.17.5", - "shx": "^0.2.2" - }, - "dependencies": { - "@0x/base-contract": "^3.0.13" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts deleted file mode 100644 index cc42e7fb5..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts +++ /dev/null @@ -1,1494 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - -export type AssetProxyOwnerEventArgs = - | AssetProxyOwnerAssetProxyRegistrationEventArgs - | AssetProxyOwnerConfirmationTimeSetEventArgs - | AssetProxyOwnerTimeLockChangeEventArgs - | AssetProxyOwnerConfirmationEventArgs - | AssetProxyOwnerRevocationEventArgs - | AssetProxyOwnerSubmissionEventArgs - | AssetProxyOwnerExecutionEventArgs - | AssetProxyOwnerExecutionFailureEventArgs - | AssetProxyOwnerDepositEventArgs - | AssetProxyOwnerOwnerAdditionEventArgs - | AssetProxyOwnerOwnerRemovalEventArgs - | AssetProxyOwnerRequirementChangeEventArgs; - -export enum AssetProxyOwnerEvents { - AssetProxyRegistration = 'AssetProxyRegistration', - ConfirmationTimeSet = 'ConfirmationTimeSet', - TimeLockChange = 'TimeLockChange', - Confirmation = 'Confirmation', - Revocation = 'Revocation', - Submission = 'Submission', - Execution = 'Execution', - ExecutionFailure = 'ExecutionFailure', - Deposit = 'Deposit', - OwnerAddition = 'OwnerAddition', - OwnerRemoval = 'OwnerRemoval', - RequirementChange = 'RequirementChange', -} - -export interface AssetProxyOwnerAssetProxyRegistrationEventArgs extends DecodedLogArgs { - assetProxyContract: string; - isRegistered: boolean; -} - -export interface AssetProxyOwnerConfirmationTimeSetEventArgs extends DecodedLogArgs { - transactionId: BigNumber; - confirmationTime: BigNumber; -} - -export interface AssetProxyOwnerTimeLockChangeEventArgs extends DecodedLogArgs { - secondsTimeLocked: BigNumber; -} - -export interface AssetProxyOwnerConfirmationEventArgs extends DecodedLogArgs { - sender: string; - transactionId: BigNumber; -} - -export interface AssetProxyOwnerRevocationEventArgs extends DecodedLogArgs { - sender: string; - transactionId: BigNumber; -} - -export interface AssetProxyOwnerSubmissionEventArgs extends DecodedLogArgs { - transactionId: BigNumber; -} - -export interface AssetProxyOwnerExecutionEventArgs extends DecodedLogArgs { - transactionId: BigNumber; -} - -export interface AssetProxyOwnerExecutionFailureEventArgs extends DecodedLogArgs { - transactionId: BigNumber; -} - -export interface AssetProxyOwnerDepositEventArgs extends DecodedLogArgs { - sender: string; - value: BigNumber; -} - -export interface AssetProxyOwnerOwnerAdditionEventArgs extends DecodedLogArgs { - owner: string; -} - -export interface AssetProxyOwnerOwnerRemovalEventArgs extends DecodedLogArgs { - owner: string; -} - -export interface AssetProxyOwnerRequirementChangeEventArgs extends DecodedLogArgs { - required: BigNumber; -} - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class AssetProxyOwnerContract extends BaseContract { - public owners = { - async callAsync( - index_0: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('owners(uint256)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('owners(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public removeOwner = { - async sendTransactionAsync( - owner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('removeOwner(address)', [owner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.removeOwner.estimateGasAsync.bind( - self, - owner - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - owner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('removeOwner(address)', [owner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - owner: string, - ): string { - const self = this as any as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('removeOwner(address)', [owner - ]); - return abiEncodedTransactionData; - }, - async callAsync( - owner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('removeOwner(address)', [owner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('removeOwner(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public revokeConfirmation = { - async sendTransactionAsync( - transactionId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('revokeConfirmation(uint256)', [transactionId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.revokeConfirmation.estimateGasAsync.bind( - self, - transactionId - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - transactionId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('revokeConfirmation(uint256)', [transactionId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - transactionId: BigNumber, - ): string { - const self = this as any as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('revokeConfirmation(uint256)', [transactionId - ]); - return abiEncodedTransactionData; - }, - async callAsync( - transactionId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('revokeConfirmation(uint256)', [transactionId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('revokeConfirmation(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public isOwner = { - async callAsync( - index_0: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('isOwner(address)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('isOwner(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public confirmations = { - async callAsync( - index_0: BigNumber, - index_1: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('confirmations(uint256,address)', [index_0, - index_1 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('confirmations(uint256,address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public executeRemoveAuthorizedAddressAtIndex = { - async sendTransactionAsync( - transactionId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('executeRemoveAuthorizedAddressAtIndex(uint256)', [transactionId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.executeRemoveAuthorizedAddressAtIndex.estimateGasAsync.bind( - self, - transactionId - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - transactionId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('executeRemoveAuthorizedAddressAtIndex(uint256)', [transactionId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - transactionId: BigNumber, - ): string { - const self = this as any as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('executeRemoveAuthorizedAddressAtIndex(uint256)', [transactionId - ]); - return abiEncodedTransactionData; - }, - async callAsync( - transactionId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('executeRemoveAuthorizedAddressAtIndex(uint256)', [transactionId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('executeRemoveAuthorizedAddressAtIndex(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public secondsTimeLocked = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('secondsTimeLocked()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('secondsTimeLocked()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getTransactionCount = { - async callAsync( - pending: boolean, - executed: boolean, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('getTransactionCount(bool,bool)', [pending, - executed - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getTransactionCount(bool,bool)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public registerAssetProxy = { - async sendTransactionAsync( - assetProxyContract: string, - isRegistered: boolean, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('registerAssetProxy(address,bool)', [assetProxyContract, - isRegistered - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.registerAssetProxy.estimateGasAsync.bind( - self, - assetProxyContract, - isRegistered - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - assetProxyContract: string, - isRegistered: boolean, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('registerAssetProxy(address,bool)', [assetProxyContract, - isRegistered - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - assetProxyContract: string, - isRegistered: boolean, - ): string { - const self = this as any as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('registerAssetProxy(address,bool)', [assetProxyContract, - isRegistered - ]); - return abiEncodedTransactionData; - }, - async callAsync( - assetProxyContract: string, - isRegistered: boolean, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('registerAssetProxy(address,bool)', [assetProxyContract, - isRegistered - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address,bool)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public addOwner = { - async sendTransactionAsync( - owner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('addOwner(address)', [owner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.addOwner.estimateGasAsync.bind( - self, - owner - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - owner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('addOwner(address)', [owner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - owner: string, - ): string { - const self = this as any as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('addOwner(address)', [owner - ]); - return abiEncodedTransactionData; - }, - async callAsync( - owner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('addOwner(address)', [owner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('addOwner(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public isConfirmed = { - async callAsync( - transactionId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('isConfirmed(uint256)', [transactionId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('isConfirmed(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public changeTimeLock = { - async sendTransactionAsync( - _secondsTimeLocked: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('changeTimeLock(uint256)', [_secondsTimeLocked - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.changeTimeLock.estimateGasAsync.bind( - self, - _secondsTimeLocked - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _secondsTimeLocked: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('changeTimeLock(uint256)', [_secondsTimeLocked - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _secondsTimeLocked: BigNumber, - ): string { - const self = this as any as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('changeTimeLock(uint256)', [_secondsTimeLocked - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _secondsTimeLocked: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('changeTimeLock(uint256)', [_secondsTimeLocked - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('changeTimeLock(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public isAssetProxyRegistered = { - async callAsync( - index_0: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('isAssetProxyRegistered(address)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('isAssetProxyRegistered(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getConfirmationCount = { - async callAsync( - transactionId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('getConfirmationCount(uint256)', [transactionId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getConfirmationCount(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transactions = { - async callAsync( - index_0: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<[string, BigNumber, string, boolean] - > { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('transactions(uint256)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transactions(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<[string, BigNumber, string, boolean] - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getOwners = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('getOwners()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getOwners()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getTransactionIds = { - async callAsync( - from: BigNumber, - to: BigNumber, - pending: boolean, - executed: boolean, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('getTransactionIds(uint256,uint256,bool,bool)', [from, - to, - pending, - executed - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getTransactionIds(uint256,uint256,bool,bool)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getConfirmations = { - async callAsync( - transactionId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('getConfirmations(uint256)', [transactionId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getConfirmations(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transactionCount = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('transactionCount()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transactionCount()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public changeRequirement = { - async sendTransactionAsync( - _required: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('changeRequirement(uint256)', [_required - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.changeRequirement.estimateGasAsync.bind( - self, - _required - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _required: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('changeRequirement(uint256)', [_required - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _required: BigNumber, - ): string { - const self = this as any as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('changeRequirement(uint256)', [_required - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _required: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('changeRequirement(uint256)', [_required - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('changeRequirement(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public confirmTransaction = { - async sendTransactionAsync( - transactionId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('confirmTransaction(uint256)', [transactionId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.confirmTransaction.estimateGasAsync.bind( - self, - transactionId - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - transactionId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('confirmTransaction(uint256)', [transactionId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - transactionId: BigNumber, - ): string { - const self = this as any as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('confirmTransaction(uint256)', [transactionId - ]); - return abiEncodedTransactionData; - }, - async callAsync( - transactionId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('confirmTransaction(uint256)', [transactionId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('confirmTransaction(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public submitTransaction = { - async sendTransactionAsync( - destination: string, - value: BigNumber, - data: string, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('submitTransaction(address,uint256,bytes)', [destination, - value, - data - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.submitTransaction.estimateGasAsync.bind( - self, - destination, - value, - data - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - destination: string, - value: BigNumber, - data: string, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('submitTransaction(address,uint256,bytes)', [destination, - value, - data - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - destination: string, - value: BigNumber, - data: string, - ): string { - const self = this as any as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('submitTransaction(address,uint256,bytes)', [destination, - value, - data - ]); - return abiEncodedTransactionData; - }, - async callAsync( - destination: string, - value: BigNumber, - data: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('submitTransaction(address,uint256,bytes)', [destination, - value, - data - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('submitTransaction(address,uint256,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public confirmationTimes = { - async callAsync( - index_0: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('confirmationTimes(uint256)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('confirmationTimes(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public MAX_OWNER_COUNT = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('MAX_OWNER_COUNT()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('MAX_OWNER_COUNT()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public required = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('required()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('required()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public replaceOwner = { - async sendTransactionAsync( - owner: string, - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('replaceOwner(address,address)', [owner, - newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.replaceOwner.estimateGasAsync.bind( - self, - owner, - newOwner - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - owner: string, - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('replaceOwner(address,address)', [owner, - newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - owner: string, - newOwner: string, - ): string { - const self = this as any as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('replaceOwner(address,address)', [owner, - newOwner - ]); - return abiEncodedTransactionData; - }, - async callAsync( - owner: string, - newOwner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('replaceOwner(address,address)', [owner, - newOwner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('replaceOwner(address,address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public executeTransaction = { - async sendTransactionAsync( - transactionId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('executeTransaction(uint256)', [transactionId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.executeTransaction.estimateGasAsync.bind( - self, - transactionId - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - transactionId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('executeTransaction(uint256)', [transactionId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - transactionId: BigNumber, - ): string { - const self = this as any as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('executeTransaction(uint256)', [transactionId - ]); - return abiEncodedTransactionData; - }, - async callAsync( - transactionId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as AssetProxyOwnerContract; - const encodedData = self._strictEncodeArguments('executeTransaction(uint256)', [transactionId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('executeTransaction(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - _owners: string[], - _assetProxyContracts: string[], - _required: BigNumber, - _secondsTimeLocked: BigNumber, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return AssetProxyOwnerContract.deployAsync(bytecode, abi, provider, txDefaults, _owners, -_assetProxyContracts, -_required, -_secondsTimeLocked -); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - _owners: string[], - _assetProxyContracts: string[], - _required: BigNumber, - _secondsTimeLocked: BigNumber, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [_owners, -_assetProxyContracts, -_required, -_secondsTimeLocked -] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [_owners, -_assetProxyContracts, -_required, -_secondsTimeLocked -], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, [_owners, -_assetProxyContracts, -_required, -_secondsTimeLocked -]); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`AssetProxyOwner successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new AssetProxyOwnerContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = [_owners, -_assetProxyContracts, -_required, -_secondsTimeLocked -]; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('AssetProxyOwner', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts deleted file mode 100644 index cab09c4d2..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts +++ /dev/null @@ -1,828 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - -export type DummyERC20TokenEventArgs = - | DummyERC20TokenTransferEventArgs - | DummyERC20TokenApprovalEventArgs; - -export enum DummyERC20TokenEvents { - Transfer = 'Transfer', - Approval = 'Approval', -} - -export interface DummyERC20TokenTransferEventArgs extends DecodedLogArgs { - _from: string; - _to: string; - _value: BigNumber; -} - -export interface DummyERC20TokenApprovalEventArgs extends DecodedLogArgs { - _owner: string; - _spender: string; - _value: BigNumber; -} - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class DummyERC20TokenContract extends BaseContract { - public name = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('name()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('name()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public approve = { - async sendTransactionAsync( - _spender: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.approve.estimateGasAsync.bind( - self, - _spender, - _value - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _spender: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _spender: string, - _value: BigNumber, - ): string { - const self = this as any as DummyERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_spender, - _value - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _spender: string, - _value: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, - _value - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public totalSupply = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('totalSupply()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('totalSupply()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transferFrom = { - async sendTransactionAsync( - _from: string, - _to: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transferFrom.estimateGasAsync.bind( - self, - _from, - _to, - _value - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _from: string, - _to: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _from: string, - _to: string, - _value: BigNumber, - ): string { - const self = this as any as DummyERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _value - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _from: string, - _to: string, - _value: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _value - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public decimals = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('decimals()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('decimals()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public balanceOf = { - async callAsync( - _owner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('balanceOf(address)', [_owner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public owner = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('owner()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public symbol = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('symbol()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('symbol()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public mint = { - async sendTransactionAsync( - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('mint(uint256)', [_value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.mint.estimateGasAsync.bind( - self, - _value - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('mint(uint256)', [_value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _value: BigNumber, - ): string { - const self = this as any as DummyERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('mint(uint256)', [_value - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _value: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('mint(uint256)', [_value - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('mint(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transfer = { - async sendTransactionAsync( - _to: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transfer.estimateGasAsync.bind( - self, - _to, - _value - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _to: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _to: string, - _value: BigNumber, - ): string { - const self = this as any as DummyERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transfer(address,uint256)', [_to, - _value - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _to: string, - _value: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, - _value - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public allowance = { - async callAsync( - _owner: string, - _spender: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('allowance(address,address)', [_owner, - _spender - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('allowance(address,address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public setBalance = { - async sendTransactionAsync( - _target: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('setBalance(address,uint256)', [_target, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.setBalance.estimateGasAsync.bind( - self, - _target, - _value - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _target: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('setBalance(address,uint256)', [_target, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _target: string, - _value: BigNumber, - ): string { - const self = this as any as DummyERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('setBalance(address,uint256)', [_target, - _value - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _target: string, - _value: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('setBalance(address,uint256)', [_target, - _value - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('setBalance(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transferOwnership = { - async sendTransactionAsync( - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transferOwnership.estimateGasAsync.bind( - self, - newOwner - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - newOwner: string, - ): string { - const self = this as any as DummyERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - return abiEncodedTransactionData; - }, - async callAsync( - newOwner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public MAX_MINT_AMOUNT = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC20TokenContract; - const encodedData = self._strictEncodeArguments('MAX_MINT_AMOUNT()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('MAX_MINT_AMOUNT()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - _name: string, - _symbol: string, - _decimals: BigNumber, - _totalSupply: BigNumber, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return DummyERC20TokenContract.deployAsync(bytecode, abi, provider, txDefaults, _name, -_symbol, -_decimals, -_totalSupply -); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - _name: string, - _symbol: string, - _decimals: BigNumber, - _totalSupply: BigNumber, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [_name, -_symbol, -_decimals, -_totalSupply -] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [_name, -_symbol, -_decimals, -_totalSupply -], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, [_name, -_symbol, -_decimals, -_totalSupply -]); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`DummyERC20Token successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new DummyERC20TokenContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = [_name, -_symbol, -_decimals, -_totalSupply -]; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('DummyERC20Token', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts deleted file mode 100644 index 9cb54442b..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts +++ /dev/null @@ -1,1006 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - -export type DummyERC721TokenEventArgs = - | DummyERC721TokenTransferEventArgs - | DummyERC721TokenApprovalEventArgs - | DummyERC721TokenApprovalForAllEventArgs; - -export enum DummyERC721TokenEvents { - Transfer = 'Transfer', - Approval = 'Approval', - ApprovalForAll = 'ApprovalForAll', -} - -export interface DummyERC721TokenTransferEventArgs extends DecodedLogArgs { - _from: string; - _to: string; - _tokenId: BigNumber; -} - -export interface DummyERC721TokenApprovalEventArgs extends DecodedLogArgs { - _owner: string; - _approved: string; - _tokenId: BigNumber; -} - -export interface DummyERC721TokenApprovalForAllEventArgs extends DecodedLogArgs { - _owner: string; - _operator: string; - _approved: boolean; -} - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class DummyERC721TokenContract extends BaseContract { - public name = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('name()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('name()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getApproved = { - async callAsync( - _tokenId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('getApproved(uint256)', [_tokenId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getApproved(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public approve = { - async sendTransactionAsync( - _approved: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_approved, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.approve.estimateGasAsync.bind( - self, - _approved, - _tokenId - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _approved: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_approved, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _approved: string, - _tokenId: BigNumber, - ): string { - const self = this as any as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_approved, - _tokenId - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _approved: string, - _tokenId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_approved, - _tokenId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transferFrom = { - async sendTransactionAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transferFrom.estimateGasAsync.bind( - self, - _from, - _to, - _tokenId - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _from: string, - _to: string, - _tokenId: BigNumber, - ): string { - const self = this as any as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public mint = { - async sendTransactionAsync( - _to: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('mint(address,uint256)', [_to, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.mint.estimateGasAsync.bind( - self, - _to, - _tokenId - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _to: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('mint(address,uint256)', [_to, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _to: string, - _tokenId: BigNumber, - ): string { - const self = this as any as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('mint(address,uint256)', [_to, - _tokenId - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _to: string, - _tokenId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('mint(address,uint256)', [_to, - _tokenId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('mint(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public safeTransferFrom1 = { - async sendTransactionAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.safeTransferFrom1.estimateGasAsync.bind( - self, - _from, - _to, - _tokenId - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _from: string, - _to: string, - _tokenId: BigNumber, - ): string { - const self = this as any as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public ownerOf = { - async callAsync( - _tokenId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('ownerOf(uint256)', [_tokenId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('ownerOf(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public balanceOf = { - async callAsync( - _owner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('balanceOf(address)', [_owner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public owner = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('owner()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public symbol = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('symbol()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('symbol()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public burn = { - async sendTransactionAsync( - _owner: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('burn(address,uint256)', [_owner, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.burn.estimateGasAsync.bind( - self, - _owner, - _tokenId - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _owner: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('burn(address,uint256)', [_owner, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _owner: string, - _tokenId: BigNumber, - ): string { - const self = this as any as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('burn(address,uint256)', [_owner, - _tokenId - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _owner: string, - _tokenId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('burn(address,uint256)', [_owner, - _tokenId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('burn(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public setApprovalForAll = { - async sendTransactionAsync( - _operator: string, - _approved: boolean, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator, - _approved - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.setApprovalForAll.estimateGasAsync.bind( - self, - _operator, - _approved - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _operator: string, - _approved: boolean, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator, - _approved - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _operator: string, - _approved: boolean, - ): string { - const self = this as any as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator, - _approved - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _operator: string, - _approved: boolean, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator, - _approved - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('setApprovalForAll(address,bool)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public safeTransferFrom2 = { - async sendTransactionAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - _data: string, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from, - _to, - _tokenId, - _data - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.safeTransferFrom2.estimateGasAsync.bind( - self, - _from, - _to, - _tokenId, - _data - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - _data: string, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from, - _to, - _tokenId, - _data - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _from: string, - _to: string, - _tokenId: BigNumber, - _data: string, - ): string { - const self = this as any as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from, - _to, - _tokenId, - _data - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - _data: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from, - _to, - _tokenId, - _data - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public isApprovedForAll = { - async callAsync( - _owner: string, - _operator: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('isApprovedForAll(address,address)', [_owner, - _operator - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('isApprovedForAll(address,address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transferOwnership = { - async sendTransactionAsync( - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transferOwnership.estimateGasAsync.bind( - self, - newOwner - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - newOwner: string, - ): string { - const self = this as any as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - return abiEncodedTransactionData; - }, - async callAsync( - newOwner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as DummyERC721TokenContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - _name: string, - _symbol: string, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return DummyERC721TokenContract.deployAsync(bytecode, abi, provider, txDefaults, _name, -_symbol -); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - _name: string, - _symbol: string, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [_name, -_symbol -] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [_name, -_symbol -], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, [_name, -_symbol -]); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`DummyERC721Token successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new DummyERC721TokenContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = [_name, -_symbol -]; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('DummyERC721Token', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts deleted file mode 100644 index 9be95af65..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts +++ /dev/null @@ -1,250 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class DutchAuctionContract extends BaseContract { - public getAuctionDetails = { - async sendTransactionAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - txData: Partial = {}, - ): Promise { - const self = this as any as DutchAuctionContract; - const encodedData = self._strictEncodeArguments('getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', [order - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.getAuctionDetails.estimateGasAsync.bind( - self, - order - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - txData: Partial = {}, - ): Promise { - const self = this as any as DutchAuctionContract; - const encodedData = self._strictEncodeArguments('getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', [order - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - ): string { - const self = this as any as DutchAuctionContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', [order - ]); - return abiEncodedTransactionData; - }, - async callAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{beginTimeSeconds: BigNumber;endTimeSeconds: BigNumber;beginAmount: BigNumber;endAmount: BigNumber;currentAmount: BigNumber;currentTimeSeconds: BigNumber} - > { - const self = this as any as DutchAuctionContract; - const encodedData = self._strictEncodeArguments('getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', [order - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{beginTimeSeconds: BigNumber;endTimeSeconds: BigNumber;beginAmount: BigNumber;endAmount: BigNumber;currentAmount: BigNumber;currentTimeSeconds: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public matchOrders = { - async sendTransactionAsync( - buyOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - sellOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - buySignature: string, - sellSignature: string, - txData: Partial = {}, - ): Promise { - const self = this as any as DutchAuctionContract; - const encodedData = self._strictEncodeArguments('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', [buyOrder, - sellOrder, - buySignature, - sellSignature - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.matchOrders.estimateGasAsync.bind( - self, - buyOrder, - sellOrder, - buySignature, - sellSignature - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - buyOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - sellOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - buySignature: string, - sellSignature: string, - txData: Partial = {}, - ): Promise { - const self = this as any as DutchAuctionContract; - const encodedData = self._strictEncodeArguments('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', [buyOrder, - sellOrder, - buySignature, - sellSignature - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - buyOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - sellOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - buySignature: string, - sellSignature: string, - ): string { - const self = this as any as DutchAuctionContract; - const abiEncodedTransactionData = self._strictEncodeArguments('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', [buyOrder, - sellOrder, - buySignature, - sellSignature - ]); - return abiEncodedTransactionData; - }, - async callAsync( - buyOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - sellOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - buySignature: string, - sellSignature: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{left: {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber};right: {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber};leftMakerAssetSpreadAmount: BigNumber} - > { - const self = this as any as DutchAuctionContract; - const encodedData = self._strictEncodeArguments('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', [buyOrder, - sellOrder, - buySignature, - sellSignature - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{left: {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber};right: {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber};leftMakerAssetSpreadAmount: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - _exchange: string, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return DutchAuctionContract.deployAsync(bytecode, abi, provider, txDefaults, _exchange -); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - _exchange: string, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [_exchange -] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [_exchange -], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, [_exchange -]); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`DutchAuction successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new DutchAuctionContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = [_exchange -]; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('DutchAuction', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts deleted file mode 100644 index 1d53df6b8..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts +++ /dev/null @@ -1,530 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - -export type ERC20ProxyEventArgs = - | ERC20ProxyAuthorizedAddressAddedEventArgs - | ERC20ProxyAuthorizedAddressRemovedEventArgs; - -export enum ERC20ProxyEvents { - AuthorizedAddressAdded = 'AuthorizedAddressAdded', - AuthorizedAddressRemoved = 'AuthorizedAddressRemoved', -} - -export interface ERC20ProxyAuthorizedAddressAddedEventArgs extends DecodedLogArgs { - target: string; - caller: string; -} - -export interface ERC20ProxyAuthorizedAddressRemovedEventArgs extends DecodedLogArgs { - target: string; - caller: string; -} - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class ERC20ProxyContract extends BaseContract { - public addAuthorizedAddress = { - async sendTransactionAsync( - target: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.addAuthorizedAddress.estimateGasAsync.bind( - self, - target - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - target: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - target: string, - ): string { - const self = this as any as ERC20ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target - ]); - return abiEncodedTransactionData; - }, - async callAsync( - target: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public authorities = { - async callAsync( - index_0: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('authorities(uint256)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('authorities(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public removeAuthorizedAddress = { - async sendTransactionAsync( - target: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.removeAuthorizedAddress.estimateGasAsync.bind( - self, - target - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - target: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - target: string, - ): string { - const self = this as any as ERC20ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target - ]); - return abiEncodedTransactionData; - }, - async callAsync( - target: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public owner = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('owner()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public removeAuthorizedAddressAtIndex = { - async sendTransactionAsync( - target: string, - index: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, - index - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.removeAuthorizedAddressAtIndex.estimateGasAsync.bind( - self, - target, - index - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - target: string, - index: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, - index - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - target: string, - index: BigNumber, - ): string { - const self = this as any as ERC20ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, - index - ]); - return abiEncodedTransactionData; - }, - async callAsync( - target: string, - index: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, - index - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getProxyId = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('getProxyId()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public authorized = { - async callAsync( - index_0: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('authorized(address)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('authorized(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getAuthorizedAddresses = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('getAuthorizedAddresses()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transferOwnership = { - async sendTransactionAsync( - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transferOwnership.estimateGasAsync.bind( - self, - newOwner - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - newOwner: string, - ): string { - const self = this as any as ERC20ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - return abiEncodedTransactionData; - }, - async callAsync( - newOwner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20ProxyContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return ERC20ProxyContract.deployAsync(bytecode, abi, provider, txDefaults, ); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, []); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`ERC20Proxy successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new ERC20ProxyContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = []; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('ERC20Proxy', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts deleted file mode 100644 index 5070111e1..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts +++ /dev/null @@ -1,433 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - -export type ERC20TokenEventArgs = - | ERC20TokenTransferEventArgs - | ERC20TokenApprovalEventArgs; - -export enum ERC20TokenEvents { - Transfer = 'Transfer', - Approval = 'Approval', -} - -export interface ERC20TokenTransferEventArgs extends DecodedLogArgs { - _from: string; - _to: string; - _value: BigNumber; -} - -export interface ERC20TokenApprovalEventArgs extends DecodedLogArgs { - _owner: string; - _spender: string; - _value: BigNumber; -} - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class ERC20TokenContract extends BaseContract { - public approve = { - async sendTransactionAsync( - _spender: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC20TokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.approve.estimateGasAsync.bind( - self, - _spender, - _value - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _spender: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC20TokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _spender: string, - _value: BigNumber, - ): string { - const self = this as any as ERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_spender, - _value - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _spender: string, - _value: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20TokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, - _value - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public totalSupply = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20TokenContract; - const encodedData = self._strictEncodeArguments('totalSupply()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('totalSupply()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transferFrom = { - async sendTransactionAsync( - _from: string, - _to: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC20TokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transferFrom.estimateGasAsync.bind( - self, - _from, - _to, - _value - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _from: string, - _to: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC20TokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _from: string, - _to: string, - _value: BigNumber, - ): string { - const self = this as any as ERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _value - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _from: string, - _to: string, - _value: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20TokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _value - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public balanceOf = { - async callAsync( - _owner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20TokenContract; - const encodedData = self._strictEncodeArguments('balanceOf(address)', [_owner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transfer = { - async sendTransactionAsync( - _to: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC20TokenContract; - const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transfer.estimateGasAsync.bind( - self, - _to, - _value - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _to: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC20TokenContract; - const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _to: string, - _value: BigNumber, - ): string { - const self = this as any as ERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transfer(address,uint256)', [_to, - _value - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _to: string, - _value: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20TokenContract; - const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, - _value - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public allowance = { - async callAsync( - _owner: string, - _spender: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC20TokenContract; - const encodedData = self._strictEncodeArguments('allowance(address,address)', [_owner, - _spender - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('allowance(address,address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return ERC20TokenContract.deployAsync(bytecode, abi, provider, txDefaults, ); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, []); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`ERC20Token successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new ERC20TokenContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = []; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('ERC20Token', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts deleted file mode 100644 index 5a9fcc7d1..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts +++ /dev/null @@ -1,530 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - -export type ERC721ProxyEventArgs = - | ERC721ProxyAuthorizedAddressAddedEventArgs - | ERC721ProxyAuthorizedAddressRemovedEventArgs; - -export enum ERC721ProxyEvents { - AuthorizedAddressAdded = 'AuthorizedAddressAdded', - AuthorizedAddressRemoved = 'AuthorizedAddressRemoved', -} - -export interface ERC721ProxyAuthorizedAddressAddedEventArgs extends DecodedLogArgs { - target: string; - caller: string; -} - -export interface ERC721ProxyAuthorizedAddressRemovedEventArgs extends DecodedLogArgs { - target: string; - caller: string; -} - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class ERC721ProxyContract extends BaseContract { - public addAuthorizedAddress = { - async sendTransactionAsync( - target: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.addAuthorizedAddress.estimateGasAsync.bind( - self, - target - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - target: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - target: string, - ): string { - const self = this as any as ERC721ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target - ]); - return abiEncodedTransactionData; - }, - async callAsync( - target: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public authorities = { - async callAsync( - index_0: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('authorities(uint256)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('authorities(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public removeAuthorizedAddress = { - async sendTransactionAsync( - target: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.removeAuthorizedAddress.estimateGasAsync.bind( - self, - target - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - target: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - target: string, - ): string { - const self = this as any as ERC721ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target - ]); - return abiEncodedTransactionData; - }, - async callAsync( - target: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public owner = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('owner()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public removeAuthorizedAddressAtIndex = { - async sendTransactionAsync( - target: string, - index: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, - index - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.removeAuthorizedAddressAtIndex.estimateGasAsync.bind( - self, - target, - index - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - target: string, - index: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, - index - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - target: string, - index: BigNumber, - ): string { - const self = this as any as ERC721ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, - index - ]); - return abiEncodedTransactionData; - }, - async callAsync( - target: string, - index: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, - index - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getProxyId = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('getProxyId()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public authorized = { - async callAsync( - index_0: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('authorized(address)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('authorized(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getAuthorizedAddresses = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('getAuthorizedAddresses()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transferOwnership = { - async sendTransactionAsync( - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transferOwnership.estimateGasAsync.bind( - self, - newOwner - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - newOwner: string, - ): string { - const self = this as any as ERC721ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - return abiEncodedTransactionData; - }, - async callAsync( - newOwner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721ProxyContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return ERC721ProxyContract.deployAsync(bytecode, abi, provider, txDefaults, ); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, []); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`ERC721Proxy successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new ERC721ProxyContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = []; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('ERC721Proxy', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts deleted file mode 100644 index aaae2ab76..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts +++ /dev/null @@ -1,668 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - -export type ERC721TokenEventArgs = - | ERC721TokenTransferEventArgs - | ERC721TokenApprovalEventArgs - | ERC721TokenApprovalForAllEventArgs; - -export enum ERC721TokenEvents { - Transfer = 'Transfer', - Approval = 'Approval', - ApprovalForAll = 'ApprovalForAll', -} - -export interface ERC721TokenTransferEventArgs extends DecodedLogArgs { - _from: string; - _to: string; - _tokenId: BigNumber; -} - -export interface ERC721TokenApprovalEventArgs extends DecodedLogArgs { - _owner: string; - _approved: string; - _tokenId: BigNumber; -} - -export interface ERC721TokenApprovalForAllEventArgs extends DecodedLogArgs { - _owner: string; - _operator: string; - _approved: boolean; -} - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class ERC721TokenContract extends BaseContract { - public getApproved = { - async callAsync( - _tokenId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('getApproved(uint256)', [_tokenId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getApproved(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public approve = { - async sendTransactionAsync( - _approved: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_approved, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.approve.estimateGasAsync.bind( - self, - _approved, - _tokenId - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _approved: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_approved, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _approved: string, - _tokenId: BigNumber, - ): string { - const self = this as any as ERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_approved, - _tokenId - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _approved: string, - _tokenId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_approved, - _tokenId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transferFrom = { - async sendTransactionAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transferFrom.estimateGasAsync.bind( - self, - _from, - _to, - _tokenId - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _from: string, - _to: string, - _tokenId: BigNumber, - ): string { - const self = this as any as ERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public safeTransferFrom1 = { - async sendTransactionAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.safeTransferFrom1.estimateGasAsync.bind( - self, - _from, - _to, - _tokenId - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _from: string, - _to: string, - _tokenId: BigNumber, - ): string { - const self = this as any as ERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from, - _to, - _tokenId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public ownerOf = { - async callAsync( - _tokenId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('ownerOf(uint256)', [_tokenId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('ownerOf(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public balanceOf = { - async callAsync( - _owner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('balanceOf(address)', [_owner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public setApprovalForAll = { - async sendTransactionAsync( - _operator: string, - _approved: boolean, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator, - _approved - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.setApprovalForAll.estimateGasAsync.bind( - self, - _operator, - _approved - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _operator: string, - _approved: boolean, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator, - _approved - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _operator: string, - _approved: boolean, - ): string { - const self = this as any as ERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator, - _approved - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _operator: string, - _approved: boolean, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator, - _approved - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('setApprovalForAll(address,bool)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public safeTransferFrom2 = { - async sendTransactionAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - _data: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from, - _to, - _tokenId, - _data - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.safeTransferFrom2.estimateGasAsync.bind( - self, - _from, - _to, - _tokenId, - _data - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - _data: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from, - _to, - _tokenId, - _data - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _from: string, - _to: string, - _tokenId: BigNumber, - _data: string, - ): string { - const self = this as any as ERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from, - _to, - _tokenId, - _data - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - _data: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from, - _to, - _tokenId, - _data - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public isApprovedForAll = { - async callAsync( - _owner: string, - _operator: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ERC721TokenContract; - const encodedData = self._strictEncodeArguments('isApprovedForAll(address,address)', [_owner, - _operator - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('isApprovedForAll(address,address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return ERC721TokenContract.deployAsync(bytecode, abi, provider, txDefaults, ); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, []); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`ERC721Token successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new ERC721TokenContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = []; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('ERC721Token', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts deleted file mode 100644 index 146fa7c2a..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts +++ /dev/null @@ -1,2279 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - -export type ExchangeEventArgs = - | ExchangeSignatureValidatorApprovalEventArgs - | ExchangeFillEventArgs - | ExchangeCancelEventArgs - | ExchangeCancelUpToEventArgs - | ExchangeAssetProxyRegisteredEventArgs; - -export enum ExchangeEvents { - SignatureValidatorApproval = 'SignatureValidatorApproval', - Fill = 'Fill', - Cancel = 'Cancel', - CancelUpTo = 'CancelUpTo', - AssetProxyRegistered = 'AssetProxyRegistered', -} - -export interface ExchangeSignatureValidatorApprovalEventArgs extends DecodedLogArgs { - signerAddress: string; - validatorAddress: string; - approved: boolean; -} - -export interface ExchangeFillEventArgs extends DecodedLogArgs { - makerAddress: string; - feeRecipientAddress: string; - takerAddress: string; - senderAddress: string; - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - orderHash: string; - makerAssetData: string; - takerAssetData: string; -} - -export interface ExchangeCancelEventArgs extends DecodedLogArgs { - makerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - orderHash: string; - makerAssetData: string; - takerAssetData: string; -} - -export interface ExchangeCancelUpToEventArgs extends DecodedLogArgs { - makerAddress: string; - senderAddress: string; - orderEpoch: BigNumber; -} - -export interface ExchangeAssetProxyRegisteredEventArgs extends DecodedLogArgs { - id: string; - assetProxy: string; -} - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class ExchangeContract extends BaseContract { - public filled = { - async callAsync( - index_0: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('filled(bytes32)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('filled(bytes32)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public batchFillOrders = { - async sendTransactionAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])', [orders, - takerAssetFillAmounts, - signatures - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.batchFillOrders.estimateGasAsync.bind( - self, - orders, - takerAssetFillAmounts, - signatures - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])', [orders, - takerAssetFillAmounts, - signatures - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])', [orders, - takerAssetFillAmounts, - signatures - ]); - return abiEncodedTransactionData; - }, - async callAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - > { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])', [orders, - takerAssetFillAmounts, - signatures - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public cancelled = { - async callAsync( - index_0: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('cancelled(bytes32)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('cancelled(bytes32)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public preSign = { - async sendTransactionAsync( - hash: string, - signerAddress: string, - signature: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('preSign(bytes32,address,bytes)', [hash, - signerAddress, - signature - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.preSign.estimateGasAsync.bind( - self, - hash, - signerAddress, - signature - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - hash: string, - signerAddress: string, - signature: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('preSign(bytes32,address,bytes)', [hash, - signerAddress, - signature - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - hash: string, - signerAddress: string, - signature: string, - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('preSign(bytes32,address,bytes)', [hash, - signerAddress, - signature - ]); - return abiEncodedTransactionData; - }, - async callAsync( - hash: string, - signerAddress: string, - signature: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('preSign(bytes32,address,bytes)', [hash, - signerAddress, - signature - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('preSign(bytes32,address,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public matchOrders = { - async sendTransactionAsync( - leftOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - rightOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - leftSignature: string, - rightSignature: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', [leftOrder, - rightOrder, - leftSignature, - rightSignature - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.matchOrders.estimateGasAsync.bind( - self, - leftOrder, - rightOrder, - leftSignature, - rightSignature - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - leftOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - rightOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - leftSignature: string, - rightSignature: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', [leftOrder, - rightOrder, - leftSignature, - rightSignature - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - leftOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - rightOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - leftSignature: string, - rightSignature: string, - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', [leftOrder, - rightOrder, - leftSignature, - rightSignature - ]); - return abiEncodedTransactionData; - }, - async callAsync( - leftOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - rightOrder: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - leftSignature: string, - rightSignature: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{left: {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber};right: {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber};leftMakerAssetSpreadAmount: BigNumber} - > { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', [leftOrder, - rightOrder, - leftSignature, - rightSignature - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{left: {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber};right: {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber};leftMakerAssetSpreadAmount: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public fillOrderNoThrow = { - async sendTransactionAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - takerAssetFillAmount: BigNumber, - signature: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)', [order, - takerAssetFillAmount, - signature - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.fillOrderNoThrow.estimateGasAsync.bind( - self, - order, - takerAssetFillAmount, - signature - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - takerAssetFillAmount: BigNumber, - signature: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)', [order, - takerAssetFillAmount, - signature - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - takerAssetFillAmount: BigNumber, - signature: string, - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)', [order, - takerAssetFillAmount, - signature - ]); - return abiEncodedTransactionData; - }, - async callAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - takerAssetFillAmount: BigNumber, - signature: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - > { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)', [order, - takerAssetFillAmount, - signature - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public assetProxies = { - async callAsync( - index_0: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('assetProxies(bytes4)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('assetProxies(bytes4)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public batchCancelOrders = { - async sendTransactionAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])', [orders - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.batchCancelOrders.estimateGasAsync.bind( - self, - orders - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])', [orders - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])', [orders - ]); - return abiEncodedTransactionData; - }, - async callAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])', [orders - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public batchFillOrKillOrders = { - async sendTransactionAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])', [orders, - takerAssetFillAmounts, - signatures - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.batchFillOrKillOrders.estimateGasAsync.bind( - self, - orders, - takerAssetFillAmounts, - signatures - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])', [orders, - takerAssetFillAmounts, - signatures - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])', [orders, - takerAssetFillAmounts, - signatures - ]); - return abiEncodedTransactionData; - }, - async callAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - > { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])', [orders, - takerAssetFillAmounts, - signatures - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public cancelOrdersUpTo = { - async sendTransactionAsync( - targetOrderEpoch: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('cancelOrdersUpTo(uint256)', [targetOrderEpoch - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.cancelOrdersUpTo.estimateGasAsync.bind( - self, - targetOrderEpoch - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - targetOrderEpoch: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('cancelOrdersUpTo(uint256)', [targetOrderEpoch - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - targetOrderEpoch: BigNumber, - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('cancelOrdersUpTo(uint256)', [targetOrderEpoch - ]); - return abiEncodedTransactionData; - }, - async callAsync( - targetOrderEpoch: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('cancelOrdersUpTo(uint256)', [targetOrderEpoch - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('cancelOrdersUpTo(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public batchFillOrdersNoThrow = { - async sendTransactionAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])', [orders, - takerAssetFillAmounts, - signatures - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.batchFillOrdersNoThrow.estimateGasAsync.bind( - self, - orders, - takerAssetFillAmounts, - signatures - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])', [orders, - takerAssetFillAmounts, - signatures - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])', [orders, - takerAssetFillAmounts, - signatures - ]); - return abiEncodedTransactionData; - }, - async callAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - > { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])', [orders, - takerAssetFillAmounts, - signatures - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getAssetProxy = { - async callAsync( - assetProxyId: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('getAssetProxy(bytes4)', [assetProxyId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getAssetProxy(bytes4)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transactions = { - async callAsync( - index_0: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('transactions(bytes32)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transactions(bytes32)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public fillOrKillOrder = { - async sendTransactionAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - takerAssetFillAmount: BigNumber, - signature: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)', [order, - takerAssetFillAmount, - signature - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.fillOrKillOrder.estimateGasAsync.bind( - self, - order, - takerAssetFillAmount, - signature - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - takerAssetFillAmount: BigNumber, - signature: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)', [order, - takerAssetFillAmount, - signature - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - takerAssetFillAmount: BigNumber, - signature: string, - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)', [order, - takerAssetFillAmount, - signature - ]); - return abiEncodedTransactionData; - }, - async callAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - takerAssetFillAmount: BigNumber, - signature: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - > { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)', [order, - takerAssetFillAmount, - signature - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public setSignatureValidatorApproval = { - async sendTransactionAsync( - validatorAddress: string, - approval: boolean, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('setSignatureValidatorApproval(address,bool)', [validatorAddress, - approval - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.setSignatureValidatorApproval.estimateGasAsync.bind( - self, - validatorAddress, - approval - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - validatorAddress: string, - approval: boolean, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('setSignatureValidatorApproval(address,bool)', [validatorAddress, - approval - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - validatorAddress: string, - approval: boolean, - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('setSignatureValidatorApproval(address,bool)', [validatorAddress, - approval - ]); - return abiEncodedTransactionData; - }, - async callAsync( - validatorAddress: string, - approval: boolean, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('setSignatureValidatorApproval(address,bool)', [validatorAddress, - approval - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('setSignatureValidatorApproval(address,bool)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public allowedValidators = { - async callAsync( - index_0: string, - index_1: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('allowedValidators(address,address)', [index_0, - index_1 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('allowedValidators(address,address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public marketSellOrders = { - async sendTransactionAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmount: BigNumber, - signatures: string[], - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - takerAssetFillAmount, - signatures - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.marketSellOrders.estimateGasAsync.bind( - self, - orders, - takerAssetFillAmount, - signatures - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmount: BigNumber, - signatures: string[], - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - takerAssetFillAmount, - signatures - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmount: BigNumber, - signatures: string[], - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - takerAssetFillAmount, - signatures - ]); - return abiEncodedTransactionData; - }, - async callAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmount: BigNumber, - signatures: string[], - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - > { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - takerAssetFillAmount, - signatures - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getOrdersInfo = { - async callAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise - > { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('getOrdersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])', [orders - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getOrdersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public preSigned = { - async callAsync( - index_0: string, - index_1: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('preSigned(bytes32,address)', [index_0, - index_1 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('preSigned(bytes32,address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public owner = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('owner()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public isValidSignature = { - async callAsync( - hash: string, - signerAddress: string, - signature: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('isValidSignature(bytes32,address,bytes)', [hash, - signerAddress, - signature - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,address,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public marketBuyOrdersNoThrow = { - async sendTransactionAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - makerAssetFillAmount: BigNumber, - signatures: string[], - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - makerAssetFillAmount, - signatures - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.marketBuyOrdersNoThrow.estimateGasAsync.bind( - self, - orders, - makerAssetFillAmount, - signatures - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - makerAssetFillAmount: BigNumber, - signatures: string[], - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - makerAssetFillAmount, - signatures - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - makerAssetFillAmount: BigNumber, - signatures: string[], - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - makerAssetFillAmount, - signatures - ]); - return abiEncodedTransactionData; - }, - async callAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - makerAssetFillAmount: BigNumber, - signatures: string[], - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - > { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - makerAssetFillAmount, - signatures - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public fillOrder = { - async sendTransactionAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - takerAssetFillAmount: BigNumber, - signature: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)', [order, - takerAssetFillAmount, - signature - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.fillOrder.estimateGasAsync.bind( - self, - order, - takerAssetFillAmount, - signature - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - takerAssetFillAmount: BigNumber, - signature: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)', [order, - takerAssetFillAmount, - signature - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - takerAssetFillAmount: BigNumber, - signature: string, - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)', [order, - takerAssetFillAmount, - signature - ]); - return abiEncodedTransactionData; - }, - async callAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - takerAssetFillAmount: BigNumber, - signature: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - > { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)', [order, - takerAssetFillAmount, - signature - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public executeTransaction = { - async sendTransactionAsync( - salt: BigNumber, - signerAddress: string, - data: string, - signature: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('executeTransaction(uint256,address,bytes,bytes)', [salt, - signerAddress, - data, - signature - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.executeTransaction.estimateGasAsync.bind( - self, - salt, - signerAddress, - data, - signature - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - salt: BigNumber, - signerAddress: string, - data: string, - signature: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('executeTransaction(uint256,address,bytes,bytes)', [salt, - signerAddress, - data, - signature - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - salt: BigNumber, - signerAddress: string, - data: string, - signature: string, - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('executeTransaction(uint256,address,bytes,bytes)', [salt, - signerAddress, - data, - signature - ]); - return abiEncodedTransactionData; - }, - async callAsync( - salt: BigNumber, - signerAddress: string, - data: string, - signature: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('executeTransaction(uint256,address,bytes,bytes)', [salt, - signerAddress, - data, - signature - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('executeTransaction(uint256,address,bytes,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public registerAssetProxy = { - async sendTransactionAsync( - assetProxy: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.registerAssetProxy.estimateGasAsync.bind( - self, - assetProxy - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - assetProxy: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - assetProxy: string, - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy - ]); - return abiEncodedTransactionData; - }, - async callAsync( - assetProxy: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getOrderInfo = { - async callAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{orderStatus: number;orderHash: string;orderTakerAssetFilledAmount: BigNumber} - > { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('getOrderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', [order - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getOrderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{orderStatus: number;orderHash: string;orderTakerAssetFilledAmount: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public cancelOrder = { - async sendTransactionAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', [order - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.cancelOrder.estimateGasAsync.bind( - self, - order - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', [order - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', [order - ]); - return abiEncodedTransactionData; - }, - async callAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', [order - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public orderEpoch = { - async callAsync( - index_0: string, - index_1: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('orderEpoch(address,address)', [index_0, - index_1 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('orderEpoch(address,address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public ZRX_ASSET_DATA = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('ZRX_ASSET_DATA()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('ZRX_ASSET_DATA()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public marketSellOrdersNoThrow = { - async sendTransactionAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmount: BigNumber, - signatures: string[], - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - takerAssetFillAmount, - signatures - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.marketSellOrdersNoThrow.estimateGasAsync.bind( - self, - orders, - takerAssetFillAmount, - signatures - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmount: BigNumber, - signatures: string[], - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - takerAssetFillAmount, - signatures - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmount: BigNumber, - signatures: string[], - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - takerAssetFillAmount, - signatures - ]); - return abiEncodedTransactionData; - }, - async callAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAssetFillAmount: BigNumber, - signatures: string[], - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - > { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - takerAssetFillAmount, - signatures - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public EIP712_DOMAIN_HASH = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('EIP712_DOMAIN_HASH()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('EIP712_DOMAIN_HASH()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public marketBuyOrders = { - async sendTransactionAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - makerAssetFillAmount: BigNumber, - signatures: string[], - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - makerAssetFillAmount, - signatures - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.marketBuyOrders.estimateGasAsync.bind( - self, - orders, - makerAssetFillAmount, - signatures - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - makerAssetFillAmount: BigNumber, - signatures: string[], - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - makerAssetFillAmount, - signatures - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - makerAssetFillAmount: BigNumber, - signatures: string[], - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - makerAssetFillAmount, - signatures - ]); - return abiEncodedTransactionData; - }, - async callAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - makerAssetFillAmount: BigNumber, - signatures: string[], - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - > { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])', [orders, - makerAssetFillAmount, - signatures - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public currentContextAddress = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('currentContextAddress()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('currentContextAddress()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transferOwnership = { - async sendTransactionAsync( - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transferOwnership.estimateGasAsync.bind( - self, - newOwner - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - newOwner: string, - ): string { - const self = this as any as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - return abiEncodedTransactionData; - }, - async callAsync( - newOwner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public VERSION = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ExchangeContract; - const encodedData = self._strictEncodeArguments('VERSION()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('VERSION()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - _zrxAssetData: string, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return ExchangeContract.deployAsync(bytecode, abi, provider, txDefaults, _zrxAssetData -); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - _zrxAssetData: string, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [_zrxAssetData -] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [_zrxAssetData -], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, [_zrxAssetData -]); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`Exchange successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new ExchangeContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = [_zrxAssetData -]; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('Exchange', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts deleted file mode 100644 index 530320792..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts +++ /dev/null @@ -1,523 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class ForwarderContract extends BaseContract { - public marketBuyOrdersWithEth = { - async sendTransactionAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - makerAssetFillAmount: BigNumber, - signatures: string[], - feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - feeSignatures: string[], - feePercentage: BigNumber, - feeRecipient: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ForwarderContract; - const encodedData = self._strictEncodeArguments('marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders, - makerAssetFillAmount, - signatures, - feeOrders, - feeSignatures, - feePercentage, - feeRecipient - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.marketBuyOrdersWithEth.estimateGasAsync.bind( - self, - orders, - makerAssetFillAmount, - signatures, - feeOrders, - feeSignatures, - feePercentage, - feeRecipient - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - makerAssetFillAmount: BigNumber, - signatures: string[], - feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - feeSignatures: string[], - feePercentage: BigNumber, - feeRecipient: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ForwarderContract; - const encodedData = self._strictEncodeArguments('marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders, - makerAssetFillAmount, - signatures, - feeOrders, - feeSignatures, - feePercentage, - feeRecipient - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - makerAssetFillAmount: BigNumber, - signatures: string[], - feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - feeSignatures: string[], - feePercentage: BigNumber, - feeRecipient: string, - ): string { - const self = this as any as ForwarderContract; - const abiEncodedTransactionData = self._strictEncodeArguments('marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders, - makerAssetFillAmount, - signatures, - feeOrders, - feeSignatures, - feePercentage, - feeRecipient - ]); - return abiEncodedTransactionData; - }, - async callAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - makerAssetFillAmount: BigNumber, - signatures: string[], - feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - feeSignatures: string[], - feePercentage: BigNumber, - feeRecipient: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<[{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}, {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}] - > { - const self = this as any as ForwarderContract; - const encodedData = self._strictEncodeArguments('marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders, - makerAssetFillAmount, - signatures, - feeOrders, - feeSignatures, - feePercentage, - feeRecipient - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<[{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}, {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}] - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public withdrawAsset = { - async sendTransactionAsync( - assetData: string, - amount: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ForwarderContract; - const encodedData = self._strictEncodeArguments('withdrawAsset(bytes,uint256)', [assetData, - amount - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.withdrawAsset.estimateGasAsync.bind( - self, - assetData, - amount - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - assetData: string, - amount: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ForwarderContract; - const encodedData = self._strictEncodeArguments('withdrawAsset(bytes,uint256)', [assetData, - amount - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - assetData: string, - amount: BigNumber, - ): string { - const self = this as any as ForwarderContract; - const abiEncodedTransactionData = self._strictEncodeArguments('withdrawAsset(bytes,uint256)', [assetData, - amount - ]); - return abiEncodedTransactionData; - }, - async callAsync( - assetData: string, - amount: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ForwarderContract; - const encodedData = self._strictEncodeArguments('withdrawAsset(bytes,uint256)', [assetData, - amount - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('withdrawAsset(bytes,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public owner = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ForwarderContract; - const encodedData = self._strictEncodeArguments('owner()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public marketSellOrdersWithEth = { - async sendTransactionAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - signatures: string[], - feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - feeSignatures: string[], - feePercentage: BigNumber, - feeRecipient: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ForwarderContract; - const encodedData = self._strictEncodeArguments('marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders, - signatures, - feeOrders, - feeSignatures, - feePercentage, - feeRecipient - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.marketSellOrdersWithEth.estimateGasAsync.bind( - self, - orders, - signatures, - feeOrders, - feeSignatures, - feePercentage, - feeRecipient - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - signatures: string[], - feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - feeSignatures: string[], - feePercentage: BigNumber, - feeRecipient: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ForwarderContract; - const encodedData = self._strictEncodeArguments('marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders, - signatures, - feeOrders, - feeSignatures, - feePercentage, - feeRecipient - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - signatures: string[], - feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - feeSignatures: string[], - feePercentage: BigNumber, - feeRecipient: string, - ): string { - const self = this as any as ForwarderContract; - const abiEncodedTransactionData = self._strictEncodeArguments('marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders, - signatures, - feeOrders, - feeSignatures, - feePercentage, - feeRecipient - ]); - return abiEncodedTransactionData; - }, - async callAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - signatures: string[], - feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - feeSignatures: string[], - feePercentage: BigNumber, - feeRecipient: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<[{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}, {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}] - > { - const self = this as any as ForwarderContract; - const encodedData = self._strictEncodeArguments('marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders, - signatures, - feeOrders, - feeSignatures, - feePercentage, - feeRecipient - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<[{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}, {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}] - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transferOwnership = { - async sendTransactionAsync( - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ForwarderContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transferOwnership.estimateGasAsync.bind( - self, - newOwner - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as ForwarderContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - newOwner: string, - ): string { - const self = this as any as ForwarderContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - return abiEncodedTransactionData; - }, - async callAsync( - newOwner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ForwarderContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - _exchange: string, - _zrxAssetData: string, - _wethAssetData: string, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return ForwarderContract.deployAsync(bytecode, abi, provider, txDefaults, _exchange, -_zrxAssetData, -_wethAssetData -); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - _exchange: string, - _zrxAssetData: string, - _wethAssetData: string, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [_exchange, -_zrxAssetData, -_wethAssetData -] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [_exchange, -_zrxAssetData, -_wethAssetData -], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, [_exchange, -_zrxAssetData, -_wethAssetData -]); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`Forwarder successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new ForwarderContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = [_exchange, -_zrxAssetData, -_wethAssetData -]; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('Forwarder', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts deleted file mode 100644 index 6cb9f64fb..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts +++ /dev/null @@ -1,96 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class IValidatorContract extends BaseContract { - public isValidSignature = { - async callAsync( - hash: string, - signerAddress: string, - signature: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as IValidatorContract; - const encodedData = self._strictEncodeArguments('isValidSignature(bytes32,address,bytes)', [hash, - signerAddress, - signature - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,address,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return IValidatorContract.deployAsync(bytecode, abi, provider, txDefaults, ); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, []); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`IValidator successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new IValidatorContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = []; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('IValidator', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts deleted file mode 100644 index 2185c7999..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts +++ /dev/null @@ -1,94 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class IWalletContract extends BaseContract { - public isValidSignature = { - async callAsync( - hash: string, - signature: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as IWalletContract; - const encodedData = self._strictEncodeArguments('isValidSignature(bytes32,bytes)', [hash, - signature - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return IWalletContract.deployAsync(bytecode, abi, provider, txDefaults, ); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, []); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`IWallet successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new IWalletContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = []; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('IWallet', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts deleted file mode 100644 index 418cab6a0..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts +++ /dev/null @@ -1,669 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - -export type MultiAssetProxyEventArgs = - | MultiAssetProxyAuthorizedAddressAddedEventArgs - | MultiAssetProxyAuthorizedAddressRemovedEventArgs - | MultiAssetProxyAssetProxyRegisteredEventArgs; - -export enum MultiAssetProxyEvents { - AuthorizedAddressAdded = 'AuthorizedAddressAdded', - AuthorizedAddressRemoved = 'AuthorizedAddressRemoved', - AssetProxyRegistered = 'AssetProxyRegistered', -} - -export interface MultiAssetProxyAuthorizedAddressAddedEventArgs extends DecodedLogArgs { - target: string; - caller: string; -} - -export interface MultiAssetProxyAuthorizedAddressRemovedEventArgs extends DecodedLogArgs { - target: string; - caller: string; -} - -export interface MultiAssetProxyAssetProxyRegisteredEventArgs extends DecodedLogArgs { - id: string; - assetProxy: string; -} - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class MultiAssetProxyContract extends BaseContract { - public assetProxies = { - async callAsync( - index_0: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('assetProxies(bytes4)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('assetProxies(bytes4)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public addAuthorizedAddress = { - async sendTransactionAsync( - target: string, - txData: Partial = {}, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.addAuthorizedAddress.estimateGasAsync.bind( - self, - target - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - target: string, - txData: Partial = {}, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - target: string, - ): string { - const self = this as any as MultiAssetProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target - ]); - return abiEncodedTransactionData; - }, - async callAsync( - target: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public authorities = { - async callAsync( - index_0: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('authorities(uint256)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('authorities(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getAssetProxy = { - async callAsync( - assetProxyId: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('getAssetProxy(bytes4)', [assetProxyId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getAssetProxy(bytes4)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public removeAuthorizedAddress = { - async sendTransactionAsync( - target: string, - txData: Partial = {}, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.removeAuthorizedAddress.estimateGasAsync.bind( - self, - target - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - target: string, - txData: Partial = {}, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - target: string, - ): string { - const self = this as any as MultiAssetProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target - ]); - return abiEncodedTransactionData; - }, - async callAsync( - target: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public owner = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('owner()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public removeAuthorizedAddressAtIndex = { - async sendTransactionAsync( - target: string, - index: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, - index - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.removeAuthorizedAddressAtIndex.estimateGasAsync.bind( - self, - target, - index - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - target: string, - index: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, - index - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - target: string, - index: BigNumber, - ): string { - const self = this as any as MultiAssetProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, - index - ]); - return abiEncodedTransactionData; - }, - async callAsync( - target: string, - index: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, - index - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getProxyId = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('getProxyId()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public authorized = { - async callAsync( - index_0: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('authorized(address)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('authorized(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public registerAssetProxy = { - async sendTransactionAsync( - assetProxy: string, - txData: Partial = {}, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.registerAssetProxy.estimateGasAsync.bind( - self, - assetProxy - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - assetProxy: string, - txData: Partial = {}, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - assetProxy: string, - ): string { - const self = this as any as MultiAssetProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy - ]); - return abiEncodedTransactionData; - }, - async callAsync( - assetProxy: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getAuthorizedAddresses = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('getAuthorizedAddresses()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transferOwnership = { - async sendTransactionAsync( - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transferOwnership.estimateGasAsync.bind( - self, - newOwner - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - newOwner: string, - txData: Partial = {}, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - newOwner: string, - ): string { - const self = this as any as MultiAssetProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - return abiEncodedTransactionData; - }, - async callAsync( - newOwner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as MultiAssetProxyContract; - const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return MultiAssetProxyContract.deployAsync(bytecode, abi, provider, txDefaults, ); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, []); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`MultiAssetProxy successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new MultiAssetProxyContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = []; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('MultiAssetProxy', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts deleted file mode 100644 index 366b207ad..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts +++ /dev/null @@ -1,288 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class OrderValidatorContract extends BaseContract { - public getOrderAndTraderInfo = { - async callAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - takerAddress: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<[{orderStatus: number;orderHash: string;orderTakerAssetFilledAmount: BigNumber}, {makerBalance: BigNumber;makerAllowance: BigNumber;takerBalance: BigNumber;takerAllowance: BigNumber;makerZrxBalance: BigNumber;makerZrxAllowance: BigNumber;takerZrxBalance: BigNumber;takerZrxAllowance: BigNumber}] - > { - const self = this as any as OrderValidatorContract; - const encodedData = self._strictEncodeArguments('getOrderAndTraderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),address)', [order, - takerAddress - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getOrderAndTraderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<[{orderStatus: number;orderHash: string;orderTakerAssetFilledAmount: BigNumber}, {makerBalance: BigNumber;makerAllowance: BigNumber;takerBalance: BigNumber;takerAllowance: BigNumber;makerZrxBalance: BigNumber;makerZrxAllowance: BigNumber;takerZrxBalance: BigNumber;takerZrxAllowance: BigNumber}] - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getBalanceAndAllowance = { - async callAsync( - target: string, - assetData: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<[BigNumber, BigNumber] - > { - const self = this as any as OrderValidatorContract; - const encodedData = self._strictEncodeArguments('getBalanceAndAllowance(address,bytes)', [target, - assetData - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getBalanceAndAllowance(address,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<[BigNumber, BigNumber] - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getOrdersAndTradersInfo = { - async callAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAddresses: string[], - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<[Array<{orderStatus: number;orderHash: string;orderTakerAssetFilledAmount: BigNumber}>, Array<{makerBalance: BigNumber;makerAllowance: BigNumber;takerBalance: BigNumber;takerAllowance: BigNumber;makerZrxBalance: BigNumber;makerZrxAllowance: BigNumber;takerZrxBalance: BigNumber;takerZrxAllowance: BigNumber}>] - > { - const self = this as any as OrderValidatorContract; - const encodedData = self._strictEncodeArguments('getOrdersAndTradersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address[])', [orders, - takerAddresses - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getOrdersAndTradersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address[])'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<[Array<{orderStatus: number;orderHash: string;orderTakerAssetFilledAmount: BigNumber}>, Array<{makerBalance: BigNumber;makerAllowance: BigNumber;takerBalance: BigNumber;takerAllowance: BigNumber;makerZrxBalance: BigNumber;makerZrxAllowance: BigNumber;takerZrxBalance: BigNumber;takerZrxAllowance: BigNumber}>] - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getTradersInfo = { - async callAsync( - orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>, - takerAddresses: string[], - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise - > { - const self = this as any as OrderValidatorContract; - const encodedData = self._strictEncodeArguments('getTradersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address[])', [orders, - takerAddresses - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getTradersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address[])'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getERC721TokenOwner = { - async callAsync( - token: string, - tokenId: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as OrderValidatorContract; - const encodedData = self._strictEncodeArguments('getERC721TokenOwner(address,uint256)', [token, - tokenId - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getERC721TokenOwner(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getBalancesAndAllowances = { - async callAsync( - target: string, - assetData: string[], - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<[BigNumber[], BigNumber[]] - > { - const self = this as any as OrderValidatorContract; - const encodedData = self._strictEncodeArguments('getBalancesAndAllowances(address,bytes[])', [target, - assetData - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getBalancesAndAllowances(address,bytes[])'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<[BigNumber[], BigNumber[]] - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public getTraderInfo = { - async callAsync( - order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}, - takerAddress: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{makerBalance: BigNumber;makerAllowance: BigNumber;takerBalance: BigNumber;takerAllowance: BigNumber;makerZrxBalance: BigNumber;makerZrxAllowance: BigNumber;takerZrxBalance: BigNumber;takerZrxAllowance: BigNumber} - > { - const self = this as any as OrderValidatorContract; - const encodedData = self._strictEncodeArguments('getTraderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),address)', [order, - takerAddress - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getTraderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{makerBalance: BigNumber;makerAllowance: BigNumber;takerBalance: BigNumber;takerAllowance: BigNumber;makerZrxBalance: BigNumber;makerZrxAllowance: BigNumber;takerZrxBalance: BigNumber;takerZrxAllowance: BigNumber} - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - _exchange: string, - _zrxAssetData: string, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return OrderValidatorContract.deployAsync(bytecode, abi, provider, txDefaults, _exchange, -_zrxAssetData -); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - _exchange: string, - _zrxAssetData: string, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [_exchange, -_zrxAssetData -] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [_exchange, -_zrxAssetData -], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, [_exchange, -_zrxAssetData -]); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`OrderValidator successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new OrderValidatorContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = [_exchange, -_zrxAssetData -]; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('OrderValidator', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts deleted file mode 100644 index 5af169e03..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts +++ /dev/null @@ -1,668 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - -export type WETH9EventArgs = - | WETH9ApprovalEventArgs - | WETH9TransferEventArgs - | WETH9DepositEventArgs - | WETH9WithdrawalEventArgs; - -export enum WETH9Events { - Approval = 'Approval', - Transfer = 'Transfer', - Deposit = 'Deposit', - Withdrawal = 'Withdrawal', -} - -export interface WETH9ApprovalEventArgs extends DecodedLogArgs { - _owner: string; - _spender: string; - _value: BigNumber; -} - -export interface WETH9TransferEventArgs extends DecodedLogArgs { - _from: string; - _to: string; - _value: BigNumber; -} - -export interface WETH9DepositEventArgs extends DecodedLogArgs { - _owner: string; - _value: BigNumber; -} - -export interface WETH9WithdrawalEventArgs extends DecodedLogArgs { - _owner: string; - _value: BigNumber; -} - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class WETH9Contract extends BaseContract { - public name = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('name()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('name()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public approve = { - async sendTransactionAsync( - guy: string, - wad: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [guy, - wad - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.approve.estimateGasAsync.bind( - self, - guy, - wad - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - guy: string, - wad: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [guy, - wad - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - guy: string, - wad: BigNumber, - ): string { - const self = this as any as WETH9Contract; - const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [guy, - wad - ]); - return abiEncodedTransactionData; - }, - async callAsync( - guy: string, - wad: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [guy, - wad - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public totalSupply = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('totalSupply()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('totalSupply()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transferFrom = { - async sendTransactionAsync( - src: string, - dst: string, - wad: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [src, - dst, - wad - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transferFrom.estimateGasAsync.bind( - self, - src, - dst, - wad - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - src: string, - dst: string, - wad: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [src, - dst, - wad - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - src: string, - dst: string, - wad: BigNumber, - ): string { - const self = this as any as WETH9Contract; - const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [src, - dst, - wad - ]); - return abiEncodedTransactionData; - }, - async callAsync( - src: string, - dst: string, - wad: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [src, - dst, - wad - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public withdraw = { - async sendTransactionAsync( - wad: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.withdraw.estimateGasAsync.bind( - self, - wad - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - wad: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - wad: BigNumber, - ): string { - const self = this as any as WETH9Contract; - const abiEncodedTransactionData = self._strictEncodeArguments('withdraw(uint256)', [wad - ]); - return abiEncodedTransactionData; - }, - async callAsync( - wad: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public decimals = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('decimals()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('decimals()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public balanceOf = { - async callAsync( - index_0: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('balanceOf(address)', [index_0 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public symbol = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('symbol()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('symbol()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transfer = { - async sendTransactionAsync( - dst: string, - wad: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [dst, - wad - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transfer.estimateGasAsync.bind( - self, - dst, - wad - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - dst: string, - wad: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [dst, - wad - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - dst: string, - wad: BigNumber, - ): string { - const self = this as any as WETH9Contract; - const abiEncodedTransactionData = self._strictEncodeArguments('transfer(address,uint256)', [dst, - wad - ]); - return abiEncodedTransactionData; - }, - async callAsync( - dst: string, - wad: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [dst, - wad - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public deposit = { - async sendTransactionAsync( - txData: Partial = {}, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('deposit()', []); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.deposit.estimateGasAsync.bind( - self, - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - txData: Partial = {}, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('deposit()', []); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - ): string { - const self = this as any as WETH9Contract; - const abiEncodedTransactionData = self._strictEncodeArguments('deposit()', []); - return abiEncodedTransactionData; - }, - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('deposit()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('deposit()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public allowance = { - async callAsync( - index_0: string, - index_1: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as WETH9Contract; - const encodedData = self._strictEncodeArguments('allowance(address,address)', [index_0, - index_1 - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('allowance(address,address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return WETH9Contract.deployAsync(bytecode, abi, provider, txDefaults, ); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, []); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`WETH9 successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new WETH9Contract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = []; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('WETH9', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts deleted file mode 100644 index 4f5d7f4c5..000000000 --- a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts +++ /dev/null @@ -1,511 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@0x/base-contract'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0x/utils'; -import { SimpleContractArtifact } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; -// tslint:enable:no-unused-variable - -export type ZRXTokenEventArgs = - | ZRXTokenTransferEventArgs - | ZRXTokenApprovalEventArgs; - -export enum ZRXTokenEvents { - Transfer = 'Transfer', - Approval = 'Approval', -} - -export interface ZRXTokenTransferEventArgs extends DecodedLogArgs { - _from: string; - _to: string; - _value: BigNumber; -} - -export interface ZRXTokenApprovalEventArgs extends DecodedLogArgs { - _owner: string; - _spender: string; - _value: BigNumber; -} - - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class ZRXTokenContract extends BaseContract { - public name = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('name()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('name()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public approve = { - async sendTransactionAsync( - _spender: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.approve.estimateGasAsync.bind( - self, - _spender, - _value - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _spender: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _spender: string, - _value: BigNumber, - ): string { - const self = this as any as ZRXTokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_spender, - _value - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _spender: string, - _value: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, - _value - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public totalSupply = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('totalSupply()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('totalSupply()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transferFrom = { - async sendTransactionAsync( - _from: string, - _to: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transferFrom.estimateGasAsync.bind( - self, - _from, - _to, - _value - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _from: string, - _to: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _from: string, - _to: string, - _value: BigNumber, - ): string { - const self = this as any as ZRXTokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _value - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _from: string, - _to: string, - _value: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, - _to, - _value - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public decimals = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('decimals()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('decimals()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public balanceOf = { - async callAsync( - _owner: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('balanceOf(address)', [_owner - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public symbol = { - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('symbol()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('symbol()'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public transfer = { - async sendTransactionAsync( - _to: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.transfer.estimateGasAsync.bind( - self, - _to, - _value - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - _to: string, - _value: BigNumber, - txData: Partial = {}, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, - _value - ]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - _to: string, - _value: BigNumber, - ): string { - const self = this as any as ZRXTokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transfer(address,uint256)', [_to, - _value - ]); - return abiEncodedTransactionData; - }, - async callAsync( - _to: string, - _value: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, - _value - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public allowance = { - async callAsync( - _owner: string, - _spender: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - const self = this as any as ZRXTokenContract; - const encodedData = self._strictEncodeArguments('allowance(address,address)', [_owner, - _spender - ]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('allowance(address,address)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - }; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - ): Promise { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return ZRXTokenContract.deployAsync(bytecode, abi, provider, txDefaults, ); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - ): Promise { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, []); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`ZRXToken successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new ZRXTokenContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = []; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('ZRXToken', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-wrappers/src/index.ts b/packages/abi-gen-wrappers/src/index.ts deleted file mode 100644 index 1a81c0187..000000000 --- a/packages/abi-gen-wrappers/src/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -export * from './generated-wrappers/asset_proxy_owner'; -export * from './generated-wrappers/dummy_erc20_token'; -export * from './generated-wrappers/dummy_erc721_token'; -export * from './generated-wrappers/dutch_auction'; -export * from './generated-wrappers/erc20_proxy'; -export * from './generated-wrappers/erc20_token'; -export * from './generated-wrappers/erc721_proxy'; -export * from './generated-wrappers/erc721_token'; -export * from './generated-wrappers/exchange'; -export * from './generated-wrappers/forwarder'; -export * from './generated-wrappers/i_validator'; -export * from './generated-wrappers/i_wallet'; -export * from './generated-wrappers/multi_asset_proxy'; -export * from './generated-wrappers/order_validator'; -export * from './generated-wrappers/weth9'; -export * from './generated-wrappers/zrx_token'; diff --git a/packages/abi-gen-wrappers/tsconfig.json b/packages/abi-gen-wrappers/tsconfig.json deleted file mode 100644 index 233008d61..000000000 --- a/packages/abi-gen-wrappers/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "lib", - "rootDir": "." - }, - "include": ["./src/**/*"] -} diff --git a/packages/abi-gen-wrappers/tslint.json b/packages/abi-gen-wrappers/tslint.json deleted file mode 100644 index dd9053357..000000000 --- a/packages/abi-gen-wrappers/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@0x/tslint-config"] -} diff --git a/packages/abi-gen/.npmignore b/packages/abi-gen/.npmignore deleted file mode 100644 index d645458f6..000000000 --- a/packages/abi-gen/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.* -yarn-error.log -/src/ -/scripts/ -tsconfig.json -/lib/monorepo_scripts/ diff --git a/packages/abi-gen/CHANGELOG.json b/packages/abi-gen/CHANGELOG.json deleted file mode 100644 index 173617b65..000000000 --- a/packages/abi-gen/CHANGELOG.json +++ /dev/null @@ -1,398 +0,0 @@ -[ - { - "version": "2.0.0", - "changes": [ - { - "note": "Upgrade the bignumber.js to v8.0.2", - "pr": 1517 - } - ] - }, - { - "timestamp": 1547561734, - "version": "1.0.22", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1547225310, - "version": "1.0.21", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1547040760, - "version": "1.0.20", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "1.0.19", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544739608 - }, - { - "version": "1.0.18", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544570656 - }, - { - "timestamp": 1542821676, - "version": "1.0.17", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542208198, - "version": "1.0.16", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "1.0.15", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1541740904 - }, - { - "timestamp": 1539871071, - "version": "1.0.14", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "1.0.13", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1538693146 - }, - { - "timestamp": 1538157789, - "version": "1.0.12", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537907159, - "version": "1.0.11", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537875740, - "version": "1.0.10", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537541580, - "version": "1.0.9", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1536142250, - "version": "1.0.8", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1535377027, - "version": "1.0.7", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1535133899, - "version": "1.0.6", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1534210131, - "version": "1.0.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532619515, - "version": "1.0.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532614997, - "version": "1.0.3", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532605697, - "version": "1.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "1.0.1", - "changes": [ - { - "note": "Fix the abi-gen entry point in package.json", - "pr": 901 - } - ], - "timestamp": 1532357734 - }, - { - "timestamp": 1532043000, - "version": "1.0.0", - "changes": [ - { - "note": "Convert e_r_c to erc in generated file names", - "pr": 822 - }, - { - "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" - } - ] - }, - { - "timestamp": 1531149657, - "version": "0.3.3", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1529397769, - "version": "0.3.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "0.3.1", - "changes": [ - { - "note": "Incorrect publish that was unpublished" - } - ], - "timestamp": 1527810075 - }, - { - "version": "0.3.0", - "changes": [ - { - "note": "Properly export the executable binary", - "pr": 588 - } - ], - "timestamp": 1527008270 - }, - { - "timestamp": 1525477860, - "version": "0.2.13", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1525428773, - "version": "0.2.12", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1524044013, - "version": "0.2.11", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1523462196, - "version": "0.2.10", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1522673609, - "version": "0.2.9", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1522658513, - "version": "0.2.8", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "0.2.5", - "changes": [ - { - "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", - "pr": 452 - } - ], - "timestamp": 1521298800 - }, - { - "version": "0.2.4", - "changes": [ - { - "note": "Add a `backend` parameter that allows you to specify the Ethereum library you use in your templates (`web3` or `ethers`). Ethers auto-converts small ints to numbers whereas Web3 doesn't. Defaults to `web3`", - "pr": 413 - }, - { - "note": "Add support for [tuple types](https://solidity.readthedocs.io/en/develop/abi-spec.html#handling-tuple-types)", - "pr": 413 - }, - { - "note": "Add `hasReturnValue` to context data", - "pr": 413 - } - ], - "timestamp": 1520089200 - }, - { - "version": "0.2.1", - "changes": [ - { - "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": 389 - } - ], - "timestamp": 1518102000 - }, - { - "version": "0.2.0", - "changes": [ - { - "note": "Added CLI options for explicit specifying location of partials and main template", - "pr": 346 - }, - { - "note": "Added CLI option to specify networkId, adding support for the JSON artifact format found in @0xproject/contracts", - "pr": 388 - } - ], - "timestamp": 1517929200 - }, - { - "version": "0.1.0", - "changes": [ - { - "note": "Fixed array typings with union types", - "pr": 295 - }, - { - "note": "Add event ABIs to context data passed to templates", - "pr": 302 - }, - { - "note": "Add constructor ABIs to context data passed to templates", - "pr": 304 - } - ], - "timestamp": 1515596400 - } -] diff --git a/packages/abi-gen/CHANGELOG.md b/packages/abi-gen/CHANGELOG.md deleted file mode 100644 index af74218b8..000000000 --- a/packages/abi-gen/CHANGELOG.md +++ /dev/null @@ -1,169 +0,0 @@ - - -CHANGELOG - -## v1.0.22 - _January 15, 2019_ - - * Dependencies updated - -## v1.0.21 - _January 11, 2019_ - - * Dependencies updated - -## v1.0.20 - _January 9, 2019_ - - * Dependencies updated - -## v1.0.19 - _December 13, 2018_ - - * Dependencies updated - -## v1.0.18 - _December 11, 2018_ - - * Dependencies updated - -## v1.0.17 - _November 21, 2018_ - - * Dependencies updated - -## v1.0.16 - _November 14, 2018_ - - * Dependencies updated - -## v1.0.15 - _November 9, 2018_ - - * Dependencies updated - -## v1.0.14 - _October 18, 2018_ - - * Dependencies updated - -## v1.0.13 - _October 4, 2018_ - - * Dependencies updated - -## v1.0.12 - _September 28, 2018_ - - * Dependencies updated - -## v1.0.11 - _September 25, 2018_ - - * Dependencies updated - -## v1.0.10 - _September 25, 2018_ - - * Dependencies updated - -## v1.0.9 - _September 21, 2018_ - - * Dependencies updated - -## v1.0.8 - _September 5, 2018_ - - * Dependencies updated - -## v1.0.7 - _August 27, 2018_ - - * Dependencies updated - -## v1.0.6 - _August 24, 2018_ - - * Dependencies updated - -## v1.0.5 - _August 14, 2018_ - - * Dependencies updated - -## v1.0.4 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.3 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.2 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.1 - _July 23, 2018_ - - * Fix the abi-gen entry point in package.json (#901) - -## v1.0.0 - _July 19, 2018_ - - * Convert e_r_c to erc in generated file names (#822) - * Remove the output directory before writing to it (#822) - * skip generation of wrappers that are already up to date (#788) - -## v0.3.4 - _July 18, 2018_ - - * Dependencies updated - -## v0.3.3 - _July 9, 2018_ - - * Dependencies updated - -## v0.3.2 - _June 19, 2018_ - - * Dependencies updated - -## v0.3.1 - _May 31, 2018_ - - * Incorrect publish that was unpublished - -## v0.3.0 - _May 22, 2018_ - - * Properly export the executable binary (#588) - -## v0.2.13 - _May 4, 2018_ - - * Dependencies updated - -## v0.2.12 - _May 4, 2018_ - - * Dependencies updated - -## v0.2.11 - _April 18, 2018_ - - * Dependencies updated - -## v0.2.10 - _April 11, 2018_ - - * Dependencies updated - -## v0.2.9 - _April 2, 2018_ - - * Dependencies updated - -## v0.2.8 - _April 2, 2018_ - - * Dependencies updated - -## v0.2.5 - _March 17, 2018_ - - * Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package (#452) - -## v0.2.4 - _March 3, 2018_ - - * Add a `backend` parameter that allows you to specify the Ethereum library you use in your templates (`web3` or `ethers`). Ethers auto-converts small ints to numbers whereas Web3 doesn't. Defaults to `web3` (#413) - * Add support for [tuple types](https://solidity.readthedocs.io/en/develop/abi-spec.html#handling-tuple-types) (#413) - * Add `hasReturnValue` to context data (#413) - -## v0.2.1 - _February 8, 2018_ - - * Fix publishing issue where .npmignore was not properly excluding undesired content (#389) - -## v0.2.0 - _February 6, 2018_ - - * Added CLI options for explicit specifying location of partials and main template (#346) - * Added CLI option to specify networkId, adding support for the JSON artifact format found in @0xproject/contracts (#388) - -## v0.1.0 - _January 10, 2018_ - - * Fixed array typings with union types (#295) - * Add event ABIs to context data passed to templates (#302) - * Add constructor ABIs to context data passed to templates (#304) diff --git a/packages/abi-gen/README.md b/packages/abi-gen/README.md deleted file mode 100644 index 214d8f257..000000000 --- a/packages/abi-gen/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# ABI Gen - -This package allows you to generate TypeScript contract wrappers from ABI files. -It's heavily inspired by [Geth abigen](https://github.com/ethereum/go-ethereum/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts) but takes a different approach. -You can write your custom handlebars templates which will allow you to seamlessly integrate the generated code into your existing codebase with existing conventions. - -[Here](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js/abi-gen-templates) are the templates used to generate the contract wrappers used by 0x.js.e - -## Installation - -`yarn add -g @0x/abi-gen` - -## Usage - -``` -abi-gen -Options: - --help Show help [boolean] - --version Show version number [boolean] - --abis Glob pattern to search for ABI JSON files - [string] [required] - --output, -o, --out Folder where to put the output files [string] [required] - --partials Glob pattern for the partial template files [string] - --template Path for the main template file that will be used to - generate each contract [string] [required] - --backend The backing Ethereum library your app uses. Either 'web3' - or 'ethers'. Ethers auto-converts small ints to numbers - whereas Web3 doesn't. - [string] [choices: "web3", "ethers"] [default: "web3"] - --network-id ID of the network where contract ABIs are nested in - artifacts [number] [default: 50] -``` - -You're required to pass a [glob]() template where your abi files are located. -TL;DR - here is the example from 0x.js. - -`--abis 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry).json` - -We could've just used `--abis 'src/artifacts/*.json` but we wanted to exclude some of the abi files. - -The abi file should be either a [Truffle](http://truffleframework.com/) contract artifact (a JSON object with an abi key) or a JSON abi array. - -You need to also specify the location of your main template used for every contract `--template` as well as the partial templates `--partials` that can later be used from the main one. - -## How to write custom templates? - -The best way to get started is to copy [0x.js templates](https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen-templates) and start adjusting them for your needs. -We use [handlebars](http://handlebarsjs.com/) template engine under the hood. -You need to have a master template called `contract.mustache`. it will be used to generate each contract wrapper. Although - you don't need and probably shouldn't write all your logic in a single template file. You can write [partial templates](http://handlebarsjs.com/partials.html) and as long as they are within a partials folder - they will be registered and available. - -## Which data/context do I get in my templates? - -For now you don't get much on top of methods abi, some useful helpers and a contract name because it was enough for our use-case, but if you need something else - create a PR. -See the [type definition](https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen/src/types.ts) of what we pass to the render method. - -## Output files - -Output files will be generated within an output folder with names converted to camel case and taken from abi file names. If you already have some files in that folder they will be overwritten. - -## Contributing - -We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. - -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. - -### Install dependencies - -If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: - -```bash -yarn config set workspaces-experimental true -``` - -Then install dependencies - -```bash -yarn install -``` - -### Build - -To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: - -```bash -PKG=@0x/abi-gen yarn build -``` - -Or continuously rebuild on change: - -```bash -PKG=@0x/abi-gen yarn watch -``` - -### Clean - -```bash -yarn clean -``` - -### Lint - -```bash -yarn lint -``` diff --git a/packages/abi-gen/bin/abi-gen.js b/packages/abi-gen/bin/abi-gen.js deleted file mode 100755 index 73ffe76ed..000000000 --- a/packages/abi-gen/bin/abi-gen.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -require('../lib/src/index.js'); diff --git a/packages/abi-gen/coverage/.gitkeep b/packages/abi-gen/coverage/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json deleted file mode 100644 index 7f968893c..000000000 --- a/packages/abi-gen/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "@0x/abi-gen", - "version": "1.0.22", - "engines": { - "node": ">=6.12" - }, - "description": "Generate contract wrappers from ABI and handlebars templates", - "main": "lib/src/index.js", - "types": "lib/src/index.d.ts", - "scripts": { - "lint": "tslint --format stylish --project .", - "clean": "shx rm -rf lib", - "build": "tsc -b", - "build:ci": "yarn build", - "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" - }, - "bin": { - "abi-gen": "bin/abi-gen.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo.git" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x-monorepo/issues" - }, - "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md", - "dependencies": { - "@0x/typescript-typings": "^3.0.8", - "@0x/utils": "^3.0.1", - "chalk": "^2.3.0", - "ethereum-types": "^1.1.6", - "glob": "^7.1.2", - "handlebars": "^4.0.11", - "lodash": "^4.17.5", - "mkdirp": "^0.5.1", - "sleep": "^5.1.1", - "tmp": "^0.0.33", - "to-snake-case": "^1.0.0", - "yargs": "^10.0.3" - }, - "devDependencies": { - "@0x/tslint-config": "^2.0.2", - "@types/glob": "5.0.35", - "@types/handlebars": "^4.0.36", - "@types/mkdirp": "^0.5.1", - "@types/node": "*", - "@types/sleep": "^0.0.7", - "@types/tmp": "^0.0.33", - "@types/yargs": "^10.0.0", - "chai": "^4.1.2", - "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.11.0", - "typescript": "3.0.1" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/abi-gen/src/globals.d.ts b/packages/abi-gen/src/globals.d.ts deleted file mode 100644 index 94e63a32d..000000000 --- a/packages/abi-gen/src/globals.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module '*.json' { - const json: any; - /* tslint:disable */ - export default json; - /* tslint:enable */ -} diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts deleted file mode 100644 index 6e0ca2c87..000000000 --- a/packages/abi-gen/src/index.ts +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/env node - -import { AbiEncoder, abiUtils, logUtils } from '@0x/utils'; -import chalk from 'chalk'; -import { AbiDefinition, ConstructorAbi, EventAbi, MethodAbi } from 'ethereum-types'; -import { sync as globSync } from 'glob'; -import * as Handlebars from 'handlebars'; -import * as _ from 'lodash'; -import * as mkdirp from 'mkdirp'; -import * as yargs from 'yargs'; - -import { ContextData, ContractsBackend, ParamKind } from './types'; -import { utils } from './utils'; - -const ABI_TYPE_CONSTRUCTOR = 'constructor'; -const ABI_TYPE_METHOD = 'function'; -const ABI_TYPE_EVENT = 'event'; -const DEFAULT_NETWORK_ID = 50; -const DEFAULT_BACKEND = 'web3'; - -const args = yargs - .option('abis', { - describe: 'Glob pattern to search for ABI JSON files', - type: 'string', - demandOption: true, - }) - .option('output', { - alias: ['o', 'out'], - describe: 'Folder where to put the output files', - type: 'string', - normalize: true, - demandOption: true, - }) - .option('partials', { - describe: 'Glob pattern for the partial template files', - type: 'string', - implies: 'template', - }) - .option('template', { - describe: 'Path for the main template file that will be used to generate each contract', - type: 'string', - demandOption: true, - normalize: true, - }) - .option('backend', { - describe: `The backing Ethereum library your app uses. Either 'web3' or 'ethers'. Ethers auto-converts small ints to numbers whereas Web3 doesn't.`, - type: 'string', - choices: [ContractsBackend.Web3, ContractsBackend.Ethers], - default: DEFAULT_BACKEND, - }) - .option('network-id', { - describe: 'ID of the network where contract ABIs are nested in artifacts', - type: 'number', - default: DEFAULT_NETWORK_ID, - }) - .example( - "$0 --abis 'src/artifacts/**/*.json' --out 'src/contracts/generated/' --partials 'src/templates/partials/**/*.handlebars' --template 'src/templates/contract.handlebars'", - 'Full usage example', - ).argv; - -function registerPartials(partialsGlob: string): void { - const partialTemplateFileNames = globSync(partialsGlob); - logUtils.log(`Found ${chalk.green(`${partialTemplateFileNames.length}`)} ${chalk.bold('partial')} templates`); - for (const partialTemplateFileName of partialTemplateFileNames) { - const namedContent = utils.getNamedContent(partialTemplateFileName); - Handlebars.registerPartial(namedContent.name, namedContent.content); - } -} - -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) { - registerPartials(args.partials); -} -const mainTemplate = utils.getNamedContent(args.template); -const template = Handlebars.compile(mainTemplate.content); -const abiFileNames = globSync(args.abis); - -if (_.isEmpty(abiFileNames)) { - logUtils.log(`${chalk.red(`No ABI files found.`)}`); - logUtils.log(`Please make sure you've passed the correct folder name and that the files have - ${chalk.bold('*.json')} extensions`); - process.exit(1); -} else { - logUtils.log(`Found ${chalk.green(`${abiFileNames.length}`)} ${chalk.bold('ABI')} files`); - mkdirp.sync(args.output); -} -for (const abiFileName of abiFileNames) { - const namedContent = utils.getNamedContent(abiFileName); - logUtils.log(`Processing: ${chalk.bold(namedContent.name)}...`); - const parsedContent = JSON.parse(namedContent.content); - let ABI; - if (_.isArray(parsedContent)) { - ABI = parsedContent; // ABI file - } else if (!_.isUndefined(parsedContent.abi)) { - ABI = parsedContent.abi; // Truffle artifact - } else if (!_.isUndefined(parsedContent.compilerOutput.abi)) { - ABI = parsedContent.compilerOutput.abi; // 0x artifact - } - if (_.isUndefined(ABI)) { - logUtils.log(`${chalk.red(`ABI not found in ${abiFileName}.`)}`); - logUtils.log( - `Please make sure your ABI file is either an array with ABI entries or a truffle artifact or 0x sol-compiler artifact`, - ); - process.exit(1); - } - - const outFileName = utils.makeOutputFileName(namedContent.name); - const outFilePath = `${args.output}/${outFileName}.ts`; - - if (utils.isOutputFileUpToDate(abiFileName, outFilePath)) { - logUtils.log(`Already 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 - } - - const methodAbis = ABI.filter((abi: AbiDefinition) => abi.type === ABI_TYPE_METHOD) as MethodAbi[]; - const sanitizedMethodAbis = abiUtils.renameOverloadedMethods(methodAbis) as MethodAbi[]; - const methodsData = _.map(methodAbis, (methodAbi, methodAbiIndex: number) => { - _.forEach(methodAbi.inputs, (input, inputIndex: number) => { - if (_.isEmpty(input.name)) { - // Auto-generated getters don't have parameter names - input.name = `index_${inputIndex}`; - } - }); - // This will make templates simpler - const methodData = { - ...methodAbi, - singleReturnValue: methodAbi.outputs.length === 1, - hasReturnValue: methodAbi.outputs.length !== 0, - tsName: sanitizedMethodAbis[methodAbiIndex].name, - functionSignature: new AbiEncoder.Method(methodAbi).getSignature(), - }; - return methodData; - }); - - const eventAbis = ABI.filter((abi: AbiDefinition) => abi.type === ABI_TYPE_EVENT) as EventAbi[]; - - const contextData = { - contractName: namedContent.name, - ctor, - methods: methodsData, - events: eventAbis, - }; - const renderedTsCode = template(contextData); - utils.writeOutputFile(outFilePath, renderedTsCode); - logUtils.log(`Created: ${chalk.bold(outFilePath)}`); -} diff --git a/packages/abi-gen/src/types.ts b/packages/abi-gen/src/types.ts deleted file mode 100644 index 68765b04d..000000000 --- a/packages/abi-gen/src/types.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { EventAbi, MethodAbi } from 'ethereum-types'; - -export enum ParamKind { - Input = 'input', - Output = 'output', -} - -export enum ContractsBackend { - Web3 = 'web3', - Ethers = 'ethers', -} - -export interface Method extends MethodAbi { - singleReturnValue: boolean; - hasReturnValue: boolean; - tsName: string; - functionSignature: string; -} - -export interface ContextData { - contractName: string; - methods: Method[]; - events: EventAbi[]; -} diff --git a/packages/abi-gen/src/utils.ts b/packages/abi-gen/src/utils.ts deleted file mode 100644 index 56b996ce3..000000000 --- a/packages/abi-gen/src/utils.ts +++ /dev/null @@ -1,119 +0,0 @@ -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'; - -export const utils = { - solTypeToTsType(paramKind: ParamKind, backend: ContractsBackend, solType: string, components?: DataItem[]): string { - const trailingArrayRegex = /\[\d*\]$/; - if (solType.match(trailingArrayRegex)) { - const arrayItemSolType = solType.replace(trailingArrayRegex, ''); - const arrayItemTsType = utils.solTypeToTsType(paramKind, backend, arrayItemSolType, components); - const arrayTsType = - utils.isUnionType(arrayItemTsType) || utils.isObjectType(arrayItemTsType) - ? `Array<${arrayItemTsType}>` - : `${arrayItemTsType}[]`; - return arrayTsType; - } else { - const solTypeRegexToTsType = [ - { regex: '^string$', tsType: 'string' }, - { regex: '^address$', tsType: 'string' }, - { regex: '^bool$', tsType: 'boolean' }, - { regex: '^u?int\\d*$', tsType: 'BigNumber' }, - { regex: '^bytes\\d*$', tsType: 'string' }, - ]; - if (paramKind === ParamKind.Input) { - // web3 and ethers allow to pass those as numbers instead of bignumbers - solTypeRegexToTsType.unshift({ - regex: '^u?int(8|16|32)?$', - tsType: 'number|BigNumber', - }); - } - if (backend === ContractsBackend.Ethers && paramKind === ParamKind.Output) { - // ethers-contracts automatically converts small BigNumbers to numbers - solTypeRegexToTsType.unshift({ - regex: '^u?int(8|16|32|48)?$', - tsType: 'number', - }); - } - for (const regexAndTxType of solTypeRegexToTsType) { - const { regex, tsType } = regexAndTxType; - if (solType.match(regex)) { - return tsType; - } - } - const TUPLE_TYPE_REGEX = '^tuple$'; - if (solType.match(TUPLE_TYPE_REGEX)) { - const componentsType = _.map(components, component => { - const componentValueType = utils.solTypeToTsType( - paramKind, - backend, - component.type, - component.components, - ); - const componentType = `${component.name}: ${componentValueType}`; - return componentType; - }); - const tsType = `{${componentsType.join(';')}}`; - return tsType; - } - throw new Error(`Unknown Solidity type found: ${solType}`); - } - }, - isUnionType(tsType: string): boolean { - return tsType === 'number|BigNumber'; - }, - isObjectType(tsType: string): boolean { - return /^{.*}$/.test(tsType); - }, - getPartialNameFromFileName(filename: string): string { - const name = path.parse(filename).name; - return name; - }, - getNamedContent(filename: string): { name: string; content: string } { - const name = utils.getPartialNameFromFileName(filename); - try { - const content = fs.readFileSync(filename).toString(); - return { - name, - content, - }; - } catch (err) { - throw new Error(`Failed to read ${filename}: ${err}`); - } - }, - getEmptyConstructor(): ConstructorAbi { - return { - type: AbiType.Constructor, - stateMutability: 'nonpayable', - payable: false, - 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 deleted file mode 100644 index 820c0c675..000000000 --- a/packages/abi-gen/test/utils_test.ts +++ /dev/null @@ -1,86 +0,0 @@ -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/abi-gen/tsconfig.json b/packages/abi-gen/tsconfig.json deleted file mode 100644 index 2ee711adc..000000000 --- a/packages/abi-gen/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "lib", - "rootDir": "." - }, - "include": ["./src/**/*", "./test/**/*"] -} diff --git a/packages/abi-gen/tslint.json b/packages/abi-gen/tslint.json deleted file mode 100644 index dd9053357..000000000 --- a/packages/abi-gen/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@0x/tslint-config"] -} diff --git a/packages/assert/.npmignore b/packages/assert/.npmignore deleted file mode 100644 index 44df80fad..000000000 --- a/packages/assert/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -.* -yarn-error.log -/src/ -/scripts/ -test/ -tsconfig.json -/lib/src/monorepo_scripts/ diff --git a/packages/assert/CHANGELOG.json b/packages/assert/CHANGELOG.json deleted file mode 100644 index 278b7dfa1..000000000 --- a/packages/assert/CHANGELOG.json +++ /dev/null @@ -1,373 +0,0 @@ -[ - { - "version": "2.0.0", - "changes": [ - { - "note": "Upgrade the bignumber.js to v8.0.2", - "pr": 1517 - } - ] - }, - { - "timestamp": 1547561734, - "version": "1.0.23", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1547225310, - "version": "1.0.22", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1547040760, - "version": "1.0.21", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "1.0.20", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544739608 - }, - { - "version": "1.0.19", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544570656 - }, - { - "timestamp": 1542821676, - "version": "1.0.18", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542208198, - "version": "1.0.17", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542028948, - "version": "1.0.16", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "1.0.15", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1541740904 - }, - { - "timestamp": 1539871071, - "version": "1.0.14", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "1.0.13", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1538693146 - }, - { - "timestamp": 1538157789, - "version": "1.0.12", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537907159, - "version": "1.0.11", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537875740, - "version": "1.0.10", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537541580, - "version": "1.0.9", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1536142250, - "version": "1.0.8", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1535377027, - "version": "1.0.7", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1535133899, - "version": "1.0.6", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1534210131, - "version": "1.0.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532619515, - "version": "1.0.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532614997, - "version": "1.0.3", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532605697, - "version": "1.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532357734, - "version": "1.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532043000, - "version": "1.0.0", - "changes": [ - { - "note": "Fix bug in string enum assertion. We erroneously were checking against the enum keys, not values", - "pr": 821 - } - ] - }, - { - "timestamp": 1531919263, - "version": "0.2.14", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1531149657, - "version": "0.2.13", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1529397769, - "version": "0.2.12", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "0.2.11", - "changes": [ - { - "note": "Incorrect publish that was unpublished" - } - ], - "timestamp": 1527810075 - }, - { - "timestamp": 1527008270, - "version": "0.2.10", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1525477860, - "version": "0.2.9", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1525428773, - "version": "0.2.8", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1524044013, - "version": "0.2.7", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1523462196, - "version": "0.2.6", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1522673609, - "version": "0.2.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1522658513, - "version": "0.2.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "0.2.0", - "changes": [ - { - "note": "Rename `isHttpUrl` to `isWebUri`", - "pr": 412 - } - ], - "timestamp": 1520434800 - }, - { - "version": "0.1.0", - "changes": [ - { - "note": "Remove isETHAddressHex checksum address check and assume address will be lowercased ", - "pr": 373 - }, - { - "note": "Add an optional parameter `subSchemas` to `doesConformToSchema` method", - "pr": 385 - } - ], - "timestamp": 1520089200 - }, - { - "version": "0.0.18", - "changes": [ - { - "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": 389 - } - ], - "timestamp": 1486566000 - }, - { - "version": "0.0.4", - "changes": [ - { - "note": "Re-publish Assert previously published under NPM package @0xproject/0x-assert" - }, - { - "note": "Added assertion isValidBaseUnitAmount which checks both that the value is a valid bigNumber and that it does not contain decimals." - } - ], - "timestamp": 1510585200 - } -] diff --git a/packages/assert/CHANGELOG.md b/packages/assert/CHANGELOG.md deleted file mode 100644 index 5a4af165a..000000000 --- a/packages/assert/CHANGELOG.md +++ /dev/null @@ -1,164 +0,0 @@ - - -CHANGELOG - -## v1.0.23 - _January 15, 2019_ - - * Dependencies updated - -## v1.0.22 - _January 11, 2019_ - - * Dependencies updated - -## v1.0.21 - _January 9, 2019_ - - * Dependencies updated - -## v1.0.20 - _December 13, 2018_ - - * Dependencies updated - -## v1.0.19 - _December 11, 2018_ - - * Dependencies updated - -## v1.0.18 - _November 21, 2018_ - - * Dependencies updated - -## v1.0.17 - _November 14, 2018_ - - * Dependencies updated - -## v1.0.16 - _November 12, 2018_ - - * Dependencies updated - -## v1.0.15 - _November 9, 2018_ - - * Dependencies updated - -## v1.0.14 - _October 18, 2018_ - - * Dependencies updated - -## v1.0.13 - _October 4, 2018_ - - * Dependencies updated - -## v1.0.12 - _September 28, 2018_ - - * Dependencies updated - -## v1.0.11 - _September 25, 2018_ - - * Dependencies updated - -## v1.0.10 - _September 25, 2018_ - - * Dependencies updated - -## v1.0.9 - _September 21, 2018_ - - * Dependencies updated - -## v1.0.8 - _September 5, 2018_ - - * Dependencies updated - -## v1.0.7 - _August 27, 2018_ - - * Dependencies updated - -## v1.0.6 - _August 24, 2018_ - - * Dependencies updated - -## v1.0.5 - _August 14, 2018_ - - * Dependencies updated - -## v1.0.4 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.3 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.2 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.1 - _July 23, 2018_ - - * Dependencies updated - -## v1.0.0 - _July 19, 2018_ - - * Fix bug in string enum assertion. We erroneously were checking against the enum keys, not values (#821) - -## v0.2.14 - _July 18, 2018_ - - * Dependencies updated - -## v0.2.13 - _July 9, 2018_ - - * Dependencies updated - -## v0.2.12 - _June 19, 2018_ - - * Dependencies updated - -## v0.2.11 - _May 31, 2018_ - - * Incorrect publish that was unpublished - -## v0.2.10 - _May 22, 2018_ - - * Dependencies updated - -## v0.2.9 - _May 4, 2018_ - - * Dependencies updated - -## v0.2.8 - _May 4, 2018_ - - * Dependencies updated - -## v0.2.7 - _April 18, 2018_ - - * Dependencies updated - -## v0.2.6 - _April 11, 2018_ - - * Dependencies updated - -## v0.2.5 - _April 2, 2018_ - - * Dependencies updated - -## v0.2.4 - _April 2, 2018_ - - * Dependencies updated - -## v0.2.0 - _March 7, 2018_ - - * Rename `isHttpUrl` to `isWebUri` (#412) - -## v0.1.0 - _March 3, 2018_ - - * Remove isETHAddressHex checksum address check and assume address will be lowercased (#373) - * Add an optional parameter `subSchemas` to `doesConformToSchema` method (#385) - -## v0.0.18 - _February 8, 2017_ - - * Fix publishing issue where .npmignore was not properly excluding undesired content (#389) - -## v0.0.4 - _November 13, 2017_ - - * Re-publish Assert previously published under NPM package @0xproject/0x-assert - * Added assertion isValidBaseUnitAmount which checks both that the value is a valid bigNumber and that it does not contain decimals. diff --git a/packages/assert/README.md b/packages/assert/README.md deleted file mode 100644 index 647586f15..000000000 --- a/packages/assert/README.md +++ /dev/null @@ -1,77 +0,0 @@ -## @0x/assert - -Standard type and schema assertions to be used across all 0x projects and packages - -## Installation - -```bash -yarn add @0x/assert -``` - -## Usage - -```typescript -import { assert } from '@0x/assert'; - -assert.isValidBaseUnitAmount('baseUnitAmount', baseUnitAmount); -``` - -If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: - -```json -"compilerOptions": { - "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], -} -``` - -## Contributing - -We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. - -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. - -### Install dependencies - -If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: - -```bash -yarn config set workspaces-experimental true -``` - -Then install dependencies - -```bash -yarn install -``` - -### Build - -To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: - -```bash -PKG=@0x/assert yarn build -``` - -Or continuously rebuild on change: - -```bash -PKG=@0x/assert yarn watch -``` - -### Clean - -```bash -yarn clean -``` - -### Lint - -```bash -yarn lint -``` - -### Run Tests - -```bash -yarn test -``` diff --git a/packages/assert/coverage/.gitkeep b/packages/assert/coverage/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/assert/package.json b/packages/assert/package.json deleted file mode 100644 index 38481d6f0..000000000 --- a/packages/assert/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "@0x/assert", - "version": "1.0.23", - "engines": { - "node": ">=6.12" - }, - "description": "Provides a standard way of performing type and schema validation across 0x projects", - "main": "lib/src/index.js", - "types": "lib/src/index.d.ts", - "scripts": { - "build": "tsc -b", - "build:ci": "yarn build", - "clean": "shx rm -rf lib test_temp", - "lint": "tslint --format stylish --project .", - "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", - "test": "yarn run_mocha", - "rebuild_and_test": "run-s clean build test", - "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", - "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "test:circleci": "yarn test:coverage" - }, - "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo.git" - }, - "bugs": { - "url": "https://github.com/0xProject/0x-monorepo/issues" - }, - "homepage": "https://github.com/0xProject/0x-monorepo/packages/assert/README.md", - "devDependencies": { - "@0x/tslint-config": "^2.0.2", - "@types/lodash": "4.14.104", - "@types/mocha": "^2.2.42", - "@types/valid-url": "^1.0.2", - "chai": "^4.0.1", - "dirty-chai": "^2.0.1", - "make-promises-safe": "^1.1.0", - "mocha": "^4.1.0", - "npm-run-all": "^4.1.2", - "nyc": "^11.0.1", - "shx": "^0.2.2", - "tslint": "5.11.0", - "typescript": "3.0.1" - }, - "dependencies": { - "@0x/json-schemas": "^2.1.7", - "@0x/typescript-typings": "^3.0.8", - "@0x/utils": "^3.0.1", - "lodash": "^4.17.5", - "valid-url": "^1.0.9" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/assert/src/globals.d.ts b/packages/assert/src/globals.d.ts deleted file mode 100644 index 94e63a32d..000000000 --- a/packages/assert/src/globals.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module '*.json' { - const json: any; - /* tslint:disable */ - export default json; - /* tslint:enable */ -} diff --git a/packages/assert/src/index.ts b/packages/assert/src/index.ts deleted file mode 100644 index 741bd78e1..000000000 --- a/packages/assert/src/index.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { Schema, SchemaValidator } from '@0x/json-schemas'; -import { addressUtils, BigNumber } from '@0x/utils'; -import * as _ from 'lodash'; -import * as validUrl from 'valid-url'; - -const HEX_REGEX = /^0x[0-9A-F]*$/i; - -export const assert = { - isBigNumber(variableName: string, value: BigNumber): void { - const isBigNumber = BigNumber.isBigNumber(value); - assert.assert(isBigNumber, assert.typeAssertionMessage(variableName, 'BigNumber', value)); - }, - isValidBaseUnitAmount(variableName: string, value: BigNumber): void { - assert.isBigNumber(variableName, value); - const isNegative = value.isLessThan(0); - assert.assert(!isNegative, `${variableName} cannot be a negative number, found value: ${value.toNumber()}`); - const hasDecimals = value.decimalPlaces() !== 0; - assert.assert( - !hasDecimals, - `${variableName} should be in baseUnits (no decimals), found value: ${value.toNumber()}`, - ); - }, - isString(variableName: string, value: string): void { - assert.assert(_.isString(value), assert.typeAssertionMessage(variableName, 'string', value)); - }, - isFunction(variableName: string, value: any): void { - assert.assert(_.isFunction(value), assert.typeAssertionMessage(variableName, 'function', value)); - }, - isHexString(variableName: string, value: string): void { - assert.assert( - _.isString(value) && HEX_REGEX.test(value), - assert.typeAssertionMessage(variableName, 'HexString', value), - ); - }, - isETHAddressHex(variableName: string, value: string): void { - assert.assert(_.isString(value), assert.typeAssertionMessage(variableName, 'string', value)); - assert.assert(addressUtils.isAddress(value), assert.typeAssertionMessage(variableName, 'ETHAddressHex', value)); - }, - doesBelongToStringEnum( - variableName: string, - value: string, - stringEnum: any /* There is no base type for every string enum */, - ): void { - const enumValues = _.values(stringEnum); - const doesBelongToStringEnum = _.includes(enumValues, value); - const enumValuesAsStrings = _.map(enumValues, enumValue => `'${enumValue}'`); - const enumValuesAsString = enumValuesAsStrings.join(', '); - assert.assert( - doesBelongToStringEnum, - `Expected ${variableName} to be one of: ${enumValuesAsString}, encountered: ${value}`, - ); - }, - hasAtMostOneUniqueValue(value: any[], errMsg: string): void { - assert.assert(_.uniq(value).length <= 1, errMsg); - }, - isNumber(variableName: string, value: number): void { - assert.assert(_.isFinite(value), assert.typeAssertionMessage(variableName, 'number', value)); - }, - isBoolean(variableName: string, value: boolean): void { - assert.assert(_.isBoolean(value), assert.typeAssertionMessage(variableName, 'boolean', value)); - }, - isWeb3Provider(variableName: string, value: any): void { - const isWeb3Provider = _.isFunction(value.send) || _.isFunction(value.sendAsync); - assert.assert(isWeb3Provider, assert.typeAssertionMessage(variableName, 'Provider', value)); - }, - doesConformToSchema(variableName: string, value: any, schema: Schema, subSchemas?: Schema[]): void { - if (_.isUndefined(value)) { - throw new Error(`${variableName} can't be undefined`); - } - const schemaValidator = new SchemaValidator(); - if (!_.isUndefined(subSchemas)) { - _.map(subSchemas, schemaValidator.addSchema.bind(schemaValidator)); - } - const validationResult = schemaValidator.validate(value, schema); - const hasValidationErrors = validationResult.errors.length > 0; - const msg = `Expected ${variableName} to conform to schema ${schema.id} -Encountered: ${JSON.stringify(value, null, '\t')} -Validation errors: ${validationResult.errors.join(', ')}`; - assert.assert(!hasValidationErrors, msg); - }, - isWebUri(variableName: string, value: any): void { - const isValidUrl = !_.isUndefined(validUrl.isWebUri(value)); - assert.assert(isValidUrl, assert.typeAssertionMessage(variableName, 'web uri', value)); - }, - isUri(variableName: string, value: any): void { - const isValidUri = !_.isUndefined(validUrl.isUri(value)); - assert.assert(isValidUri, assert.typeAssertionMessage(variableName, 'uri', value)); - }, - assert(condition: boolean, message: string): void { - if (!condition) { - throw new Error(message); - } - }, - typeAssertionMessage(variableName: string, type: string, value: any): string { - return `Expected ${variableName} to be of type ${type}, encountered: ${value}`; - }, -}; diff --git a/packages/assert/test/assert_test.ts b/packages/assert/test/assert_test.ts deleted file mode 100644 index 9266496ac..000000000 --- a/packages/assert/test/assert_test.ts +++ /dev/null @@ -1,255 +0,0 @@ -import { schemas } from '@0x/json-schemas'; -import { BigNumber } from '@0x/utils'; -import * as chai from 'chai'; -import * as dirtyChai from 'dirty-chai'; -import 'mocha'; - -import { assert } from '../src/index'; - -chai.config.includeStack = true; -chai.use(dirtyChai); -const expect = chai.expect; - -// tslint:disable:custom-no-magic-numbers -describe('Assertions', () => { - const variableName = 'variable'; - describe('#isBigNumber', () => { - it('should not throw for valid input', () => { - const validInputs = [new BigNumber(23), new BigNumber('45')]; - validInputs.forEach(input => expect(assert.isBigNumber.bind(assert, variableName, input)).to.not.throw()); - }); - it('should throw for invalid input', () => { - const invalidInputs = ['test', 42, false, { random: 'test' }, undefined]; - invalidInputs.forEach(input => expect(assert.isBigNumber.bind(assert, variableName, input)).to.throw()); - }); - }); - describe('#isValidBaseUnitAmount', () => { - it('should not throw for valid input', () => { - const validInputs = [new BigNumber(23), new BigNumber('45000000')]; - validInputs.forEach(input => - expect(assert.isValidBaseUnitAmount.bind(assert, variableName, input)).to.not.throw(), - ); - }); - it('should throw for invalid input', () => { - const invalidInputs = [0, undefined, new BigNumber(3.145), 3.145, new BigNumber(-400)]; - invalidInputs.forEach(input => - expect(assert.isValidBaseUnitAmount.bind(assert, variableName, input)).to.throw(), - ); - }); - }); - describe('#isString', () => { - it('should not throw for valid input', () => { - const validInputs = ['hello', 'goodbye']; - validInputs.forEach(input => expect(assert.isString.bind(assert, variableName, input)).to.not.throw()); - }); - it('should throw for invalid input', () => { - const invalidInputs = [42, false, { random: 'test' }, undefined, new BigNumber(45)]; - invalidInputs.forEach(input => expect(assert.isString.bind(assert, variableName, input)).to.throw()); - }); - }); - describe('#isFunction', () => { - it('should not throw for valid input', () => { - 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', () => { - const invalidInputs = [42, false, { random: 'test' }, undefined, new BigNumber(45)]; - invalidInputs.forEach(input => expect(assert.isFunction.bind(assert, variableName, input)).to.throw()); - }); - }); - describe('#isHexString', () => { - it('should not throw for valid input', () => { - const validInputs = [ - '0x61a3ed31B43c8780e905a260a35faefEc527be7516aa11c0256729b5b351bc33', - '0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254', - ]; - validInputs.forEach(input => expect(assert.isHexString.bind(assert, variableName, input)).to.not.throw()); - }); - it('should throw for invalid input', () => { - const invalidInputs = [ - 42, - false, - { random: 'test' }, - undefined, - new BigNumber(45), - '0x61a3ed31B43c8780e905a260a35faYfEc527be7516aa11c0256729b5b351bc33', - ]; - invalidInputs.forEach(input => expect(assert.isHexString.bind(assert, variableName, input)).to.throw()); - }); - }); - describe('#isETHAddressHex', () => { - it('should not throw for valid input', () => { - const validInputs = [ - '0x0000000000000000000000000000000000000000', - '0x6fffd0ae3f7d88c9b4925323f54c6e4b2918c5fd', - '0x12459c951127e0c374ff9105dda097662a027093', - ]; - validInputs.forEach(input => - expect(assert.isETHAddressHex.bind(assert, variableName, input)).to.not.throw(), - ); - }); - it('should throw for invalid input', () => { - const invalidInputs = [ - 42, - false, - { random: 'test' }, - undefined, - new BigNumber(45), - '0x6FFFd0ae3f7d88c9b4925323f54c6e4b2918c5fd', - '0x6FFFd0ae3f7d88c9b4925323f54c6e4', - ]; - invalidInputs.forEach(input => expect(assert.isETHAddressHex.bind(assert, variableName, input)).to.throw()); - }); - }); - describe('#doesBelongToStringEnum', () => { - enum TestEnums { - Test1 = 'Test1', - Test2 = 'Test2', - } - it('should not throw for valid input', () => { - const validInputs = [TestEnums.Test1, TestEnums.Test2]; - validInputs.forEach(input => - expect(assert.doesBelongToStringEnum.bind(assert, variableName, input, TestEnums)).to.not.throw(), - ); - }); - it('should throw for invalid input', () => { - const invalidInputs = [42, false, { random: 'test' }, undefined, new BigNumber(45)]; - invalidInputs.forEach(input => - expect(assert.doesBelongToStringEnum.bind(assert, variableName, input, TestEnums)).to.throw(), - ); - }); - }); - describe('#hasAtMostOneUniqueValue', () => { - const errorMsg = 'more than one unique value'; - it('should not throw for valid input', () => { - const validInputs = [['hello'], ['goodbye', 'goodbye', 'goodbye']]; - validInputs.forEach(input => - expect(assert.hasAtMostOneUniqueValue.bind(assert, input, errorMsg)).to.not.throw(), - ); - }); - it('should throw for invalid input', () => { - const invalidInputs = [['hello', 'goodbye'], ['goodbye', 42, false, false]]; - invalidInputs.forEach(input => - expect(assert.hasAtMostOneUniqueValue.bind(assert, input, errorMsg)).to.throw(), - ); - }); - }); - describe('#isNumber', () => { - it('should not throw for valid input', () => { - const validInputs = [42, 0, 21e42]; - validInputs.forEach(input => expect(assert.isNumber.bind(assert, variableName, input)).to.not.throw()); - }); - it('should throw for invalid input', () => { - const invalidInputs = [false, { random: 'test' }, undefined, new BigNumber(45)]; - invalidInputs.forEach(input => expect(assert.isNumber.bind(assert, variableName, input)).to.throw()); - }); - }); - describe('#isBoolean', () => { - it('should not throw for valid input', () => { - const validInputs = [true, false]; - validInputs.forEach(input => expect(assert.isBoolean.bind(assert, variableName, input)).to.not.throw()); - }); - it('should throw for invalid input', () => { - const invalidInputs = [42, { random: 'test' }, undefined, new BigNumber(45)]; - invalidInputs.forEach(input => expect(assert.isBoolean.bind(assert, variableName, input)).to.throw()); - }); - }); - describe('#isWeb3Provider', () => { - it('should not throw for valid input', () => { - const validInputs = [{ send: () => 45 }, { sendAsync: () => 45 }]; - validInputs.forEach(input => - expect(assert.isWeb3Provider.bind(assert, variableName, input)).to.not.throw(), - ); - }); - it('should throw for invalid input', () => { - const invalidInputs = [42, { random: 'test' }, undefined, new BigNumber(45)]; - invalidInputs.forEach(input => expect(assert.isWeb3Provider.bind(assert, variableName, input)).to.throw()); - }); - }); - describe('#doesConformToSchema', () => { - const schema = schemas.addressSchema; - it('should not throw for valid input', () => { - const validInputs = [ - '0x6fffd0ae3f7d88c9b4925323f54c6e4b2918c5fd', - '0x12459c951127e0c374ff9105dda097662a027093', - ]; - validInputs.forEach(input => - expect(assert.doesConformToSchema.bind(assert, variableName, input, schema)).to.not.throw(), - ); - }); - it('should throw for invalid input', () => { - const invalidInputs = [42, { random: 'test' }, undefined, new BigNumber(45)]; - invalidInputs.forEach(input => - expect(assert.doesConformToSchema.bind(assert, variableName, input, schema)).to.throw(), - ); - }); - }); - describe('#isWebUri', () => { - it('should not throw for valid input', () => { - const validInputs = [ - 'http://www.google.com', - 'https://api.example-relayer.net', - 'https://api.radarrelay.com/0x/v0/', - 'https://zeroex.beta.radarrelay.com:8000/0x/v0/', - ]; - validInputs.forEach(input => expect(assert.isWebUri.bind(assert, variableName, input)).to.not.throw()); - }); - it('should throw for invalid input', () => { - const invalidInputs = [ - 42, - { random: 'test' }, - undefined, - new BigNumber(45), - 'ws://www.api.example-relayer.net', - 'www.google.com', - 'api.example-relayer.net', - 'user:password@api.example-relayer.net', - '//api.example-relayer.net', - ]; - invalidInputs.forEach(input => expect(assert.isWebUri.bind(assert, variableName, input)).to.throw()); - }); - }); - describe('#isUri', () => { - it('should not throw for valid input', () => { - const validInputs = [ - 'http://www.google.com', - 'https://api.example-relayer.net', - 'https://api.radarrelay.com/0x/v0/', - 'https://zeroex.beta.radarrelay.com:8000/0x/v0/', - 'ws://www.api.example-relayer.net', - 'wss://www.api.example-relayer.net', - 'user:password@api.example-relayer.net', - ]; - validInputs.forEach(input => expect(assert.isUri.bind(assert, variableName, input)).to.not.throw()); - }); - it('should throw for invalid input', () => { - const invalidInputs = [ - 42, - { random: 'test' }, - undefined, - new BigNumber(45), - 'www.google.com', - 'api.example-relayer.net', - '//api.example-relayer.net', - ]; - invalidInputs.forEach(input => expect(assert.isUri.bind(assert, variableName, input)).to.throw()); - }); - }); - describe('#assert', () => { - const assertMessage = 'assert not satisfied'; - it('should not throw for valid input', () => { - expect(assert.assert.bind(assert, true, assertMessage)).to.not.throw(); - }); - it('should throw for invalid input', () => { - expect(assert.assert.bind(assert, false, assertMessage)).to.throw(); - }); - }); - describe('#typeAssertionMessage', () => { - it('should render correct message', () => { - expect(assert.typeAssertionMessage('variable', 'string', 'number')).to.equal( - `Expected variable to be of type string, encountered: number`, - ); - }); - }); -}); -// tslint:enable:custom-no-magic-numbers diff --git a/packages/assert/tsconfig.json b/packages/assert/tsconfig.json deleted file mode 100644 index 2ee711adc..000000000 --- a/packages/assert/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "lib", - "rootDir": "." - }, - "include": ["./src/**/*", "./test/**/*"] -} diff --git a/packages/assert/tslint.json b/packages/assert/tslint.json deleted file mode 100644 index dd9053357..000000000 --- a/packages/assert/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@0x/tslint-config"] -} diff --git a/packages/asset-buyer/.npmignore b/packages/asset-buyer/.npmignore deleted file mode 100644 index 5333847e7..000000000 --- a/packages/asset-buyer/.npmignore +++ /dev/null @@ -1,8 +0,0 @@ -.* -yarn-error.log -/src/ -/scripts/ -/schemas/ -test/ -tsconfig.json -/lib/src/monorepo_scripts/ diff --git a/packages/asset-buyer/CHANGELOG.json b/packages/asset-buyer/CHANGELOG.json deleted file mode 100644 index 2de603de0..000000000 --- a/packages/asset-buyer/CHANGELOG.json +++ /dev/null @@ -1,243 +0,0 @@ -[ - { - "version": "5.0.0", - "changes": [ - { - "note": "Upgrade the bignumber.js to v8.0.2", - "pr": 1517 - } - ] - }, - { - "version": "4.1.0", - "changes": [ - { - "note": "Adds new public method getLiquidityForAssetDataAsync, and exposes getOrdersAndFillableAmountsAsync as public method", - "pr": 1512 - } - ] - }, - { - "timestamp": 1547747677, - "version": "4.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1547561734, - "version": "4.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "4.0.0", - "changes": [ - { - "note": "Raise custom InsufficientAssetLiquidityError error with amountAvailableToFill attribute", - "pr": 1437 - } - ], - "timestamp": 1547225310 - }, - { - "timestamp": 1547040760, - "version": "3.0.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "3.0.4", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544739608 - }, - { - "version": "3.0.3", - "changes": [ - { - "note": "Update SRA order provider to include Dai" - } - ], - "timestamp": 1544570656 - }, - { - "timestamp": 1543401373, - "version": "3.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "3.0.1", - "changes": [ - { - "note": "Dependencies updated", - "pr": 1276 - } - ], - "timestamp": 1542821676 - }, - { - "version": "3.0.0", - "changes": [ - { - "note": "update `getBuyQuoteAsync` to return eth spent on assets instead of per unit amount", - "pr": 1252 - } - ], - "timestamp": 1542208198 - }, - { - "timestamp": 1542134075, - "version": "2.2.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542028948, - "version": "2.2.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "2.2.0", - "changes": [ - { - "note": "`getAssetBuyerForProvidedOrders` factory function now takes 3 args instead of 4", - "pr": 1187 - }, - { - "note": "the `OrderProvider` now requires a new method `getAvailableMakerAssetDatasAsync` and the `StandardRelayerAPIOrderProvider` requires the network id at init.", - "pr": 1203 - }, - { - "note": "No longer require that provided orders all have the same maker and taker asset data", - "pr": 1197 - }, - { - "note": "Fix bug where `BuyQuoteInfo` objects could return `totalEthAmount` and `feeEthAmount` that were not whole numbers", - "pr": 1207 - }, - { - "note": "Fix bug where default values for `AssetBuyer` public facing methods could get overriden by `undefined` values", - "pr": 1207 - }, - { - "note": "Lower default expiry buffer from 5 minutes to 2 minutes", - "pr": 1217 - } - ], - "timestamp": 1541740904 - }, - { - "version": "2.1.0", - "changes": [ - { - "note": "Add `gasLimit` and `gasPrice` as optional properties on `BuyQuoteExecutionOpts`" - }, - { - "note": "Export `BuyQuoteInfo` type", - "pr": 1131 - }, - { - "note": "Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers", - "pr": 1105 - }, - { - "note": "Add `gasLimit` and `gasPrice` as optional properties on `BuyQuoteExecutionOpts`", - "pr": 1116 - }, - { - "note": "Add `docs:json` command to package.json", - "pr": 1139 - }, - { - "note": "Add missing types to public interface", - "pr": 1139 - }, - { - "note": "Throw `SignatureRequestDenied` and `TransactionValueTooLow` errors when executing buy", - "pr": 1147 - } - ], - "timestamp": 1539871071 - }, - { - "version": "2.0.0", - "changes": [ - { - "note": "Expand AssetBuyer to work with multiple assets at once", - "pr": 1086 - }, - { - "note": "Fix minRate and maxRate calculation", - "pr": 1113 - } - ], - "timestamp": 1538693146 - }, - { - "timestamp": 1538475601, - "version": "1.0.3", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1538157789, - "version": "1.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537907159, - "version": "1.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537875740, - "version": "1.0.0", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "1.0.0-rc.1", - "changes": [ - { - "note": "Init" - } - ] - } -] diff --git a/packages/asset-buyer/CHANGELOG.md b/packages/asset-buyer/CHANGELOG.md deleted file mode 100644 index f2a3d2236..000000000 --- a/packages/asset-buyer/CHANGELOG.md +++ /dev/null @@ -1,94 +0,0 @@ - - -CHANGELOG - -## v4.0.2 - _January 17, 2019_ - - * Dependencies updated - -## v4.0.1 - _January 15, 2019_ - - * Dependencies updated - -## v4.0.0 - _January 11, 2019_ - - * Raise custom InsufficientAssetLiquidityError error with amountAvailableToFill attribute (#1437) - -## v3.0.5 - _January 9, 2019_ - - * Dependencies updated - -## v3.0.4 - _December 13, 2018_ - - * Dependencies updated - -## v3.0.3 - _December 11, 2018_ - - * Update SRA order provider to include Dai - -## v3.0.2 - _November 28, 2018_ - - * Dependencies updated - -## v3.0.1 - _November 21, 2018_ - - * Dependencies updated (#1276) - -## v3.0.0 - _November 14, 2018_ - - * update `getBuyQuoteAsync` to return eth spent on assets instead of per unit amount (#1252) - -## v2.2.2 - _November 13, 2018_ - - * Dependencies updated - -## v2.2.1 - _November 12, 2018_ - - * Dependencies updated - -## v2.2.0 - _November 9, 2018_ - - * `getAssetBuyerForProvidedOrders` factory function now takes 3 args instead of 4 (#1187) - * the `OrderProvider` now requires a new method `getAvailableMakerAssetDatasAsync` and the `StandardRelayerAPIOrderProvider` requires the network id at init. (#1203) - * No longer require that provided orders all have the same maker and taker asset data (#1197) - * Fix bug where `BuyQuoteInfo` objects could return `totalEthAmount` and `feeEthAmount` that were not whole numbers (#1207) - * Fix bug where default values for `AssetBuyer` public facing methods could get overriden by `undefined` values (#1207) - * Lower default expiry buffer from 5 minutes to 2 minutes (#1217) - -## v2.1.0 - _October 18, 2018_ - - * Add `gasLimit` and `gasPrice` as optional properties on `BuyQuoteExecutionOpts` - * Export `BuyQuoteInfo` type (#1131) - * Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers (#1105) - * Add `gasLimit` and `gasPrice` as optional properties on `BuyQuoteExecutionOpts` (#1116) - * Add `docs:json` command to package.json (#1139) - * Add missing types to public interface (#1139) - * Throw `SignatureRequestDenied` and `TransactionValueTooLow` errors when executing buy (#1147) - -## v2.0.0 - _October 4, 2018_ - - * Expand AssetBuyer to work with multiple assets at once (#1086) - * Fix minRate and maxRate calculation (#1113) - -## v1.0.3 - _October 2, 2018_ - - * Dependencies updated - -## v1.0.2 - _September 28, 2018_ - - * Dependencies updated - -## v1.0.1 - _September 25, 2018_ - - * Dependencies updated - -## v1.0.0 - _September 25, 2018_ - - * Dependencies updated - -## v1.0.0-rc.1 - _Invalid date_ - - * Init diff --git a/packages/asset-buyer/README.md b/packages/asset-buyer/README.md deleted file mode 100644 index b854bda11..000000000 --- a/packages/asset-buyer/README.md +++ /dev/null @@ -1,83 +0,0 @@ -## @0x/asset-buyer - -Convenience package for buying assets represented on the Ethereum blockchain using 0x. In its simplest form, the package helps in the usage of the [0x forwarder contract](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/forwarder-specification.md), which allows users to execute [Wrapped Ether](https://weth.io/) based 0x orders without having to set allowances, wrap Ether or own ZRX, meaning they can buy tokens with Ether alone. Given some liquidity (0x signed orders), it helps estimate the Ether cost of buying a certain asset (giving a range) and then buying that asset. - -In its more advanced and useful form, it integrates with the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api) and takes care of sourcing liquidity for you given an SRA compliant endpoint. The final result is a library that tells you what assets are available, provides an Ether based quote for any asset desired, and allows you to buy that asset using Ether alone. - -## Installation - -```bash -yarn add @0x/asset-buyer -``` - -**Import** - -```typescript -import { AssetBuyer } from '@0x/asset-buyer'; -``` - -or - -```javascript -var AssetBuyer = require('@0x/asset-buyer').AssetBuyer; -``` - -If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: - -```json -"compilerOptions": { - "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], -} -``` - -## Contributing - -We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. - -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. - -### Install dependencies - -If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: - -```bash -yarn config set workspaces-experimental true -``` - -Then install dependencies - -```bash -yarn install -``` - -### Build - -To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: - -```bash -PKG=@0x/asset-buyer yarn build -``` - -Or continuously rebuild on change: - -```bash -PKG=@0x/asset-buyer yarn watch -``` - -### Clean - -```bash -yarn clean -``` - -### Lint - -```bash -yarn lint -``` - -### Run Tests - -```bash -yarn test -``` diff --git a/packages/asset-buyer/package.json b/packages/asset-buyer/package.json deleted file mode 100644 index 0f79ac06a..000000000 --- a/packages/asset-buyer/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "@0x/asset-buyer", - "version": "4.0.2", - "engines": { - "node": ">=6.12" - }, - "description": "Convenience package for discovering and buying assets with Ether.", - "main": "lib/src/index.js", - "types": "lib/src/index.d.ts", - "scripts": { - "build": "yarn tsc -b", - "build:ci": "yarn build", - "lint": "tslint --format stylish --project .", - "test": "yarn run_mocha", - "rebuild_and_test": "run-s clean build test", - "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", - "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "test:circleci": "yarn test:coverage", - "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", - "clean": "shx rm -rf lib test_temp", - "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES" - }, - "config": { - "postpublish": { - "assets": [] - } - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo.git" - }, - "author": "", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x-monorepo/issues" - }, - "homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md", - "dependencies": { - "@0x/assert": "^1.0.23", - "@0x/connect": "^3.0.13", - "@0x/contract-wrappers": "^5.0.1", - "@0x/json-schemas": "^2.1.7", - "@0x/order-utils": "^3.1.2", - "@0x/subproviders": "^2.1.11", - "@0x/types": "^1.5.2", - "@0x/typescript-typings": "^3.0.8", - "@0x/utils": "^3.0.1", - "@0x/web3-wrapper": "^3.2.4", - "ethereum-types": "^1.1.6", - "lodash": "^4.17.5" - }, - "devDependencies": { - "@0x/tslint-config": "^2.0.2", - "@types/lodash": "^4.14.116", - "@types/mocha": "^2.2.42", - "@types/node": "*", - "chai": "^4.0.1", - "chai-as-promised": "^7.1.0", - "chai-bignumber": "^3.0.0", - "dirty-chai": "^2.0.1", - "make-promises-safe": "^1.1.0", - "mocha": "^4.1.0", - "npm-run-all": "^4.1.2", - "nyc": "^11.0.1", - "shx": "^0.2.2", - "tslint": "5.11.0", - "typedoc": "0.13.0", - "typemoq": "^2.1.0", - "typescript": "3.0.1" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/asset-buyer/src/asset_buyer.ts b/packages/asset-buyer/src/asset_buyer.ts deleted file mode 100644 index ad4b3bb60..000000000 --- a/packages/asset-buyer/src/asset_buyer.ts +++ /dev/null @@ -1,365 +0,0 @@ -import { ContractWrappers, ContractWrappersError, ForwarderWrapperError } from '@0x/contract-wrappers'; -import { schemas } from '@0x/json-schemas'; -import { SignedOrder } from '@0x/order-utils'; -import { ObjectMap } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import { Provider } from 'ethereum-types'; -import * as _ from 'lodash'; - -import { constants } from './constants'; -import { BasicOrderProvider } from './order_providers/basic_order_provider'; -import { StandardRelayerAPIOrderProvider } from './order_providers/standard_relayer_api_order_provider'; -import { - AssetBuyerError, - AssetBuyerOpts, - BuyQuote, - BuyQuoteExecutionOpts, - BuyQuoteRequestOpts, - LiquidityForAssetData, - LiquidityRequestOpts, - OrderProvider, - OrdersAndFillableAmounts, -} from './types'; - -import { assert } from './utils/assert'; -import { assetDataUtils } from './utils/asset_data_utils'; -import { buyQuoteCalculator } from './utils/buy_quote_calculator'; -import { calculateLiquidity } from './utils/calculate_liquidity'; -import { orderProviderResponseProcessor } from './utils/order_provider_response_processor'; - -interface OrdersEntry { - ordersAndFillableAmounts: OrdersAndFillableAmounts; - lastRefreshTime: number; -} - -export class AssetBuyer { - public readonly provider: Provider; - public readonly orderProvider: OrderProvider; - public readonly networkId: number; - public readonly orderRefreshIntervalMs: number; - public readonly expiryBufferSeconds: number; - private readonly _contractWrappers: ContractWrappers; - // cache of orders along with the time last updated keyed by assetData - private readonly _ordersEntryMap: ObjectMap = {}; - /** - * Instantiates a new AssetBuyer instance given existing liquidity in the form of orders and feeOrders. - * @param provider The Provider instance you would like to use for interacting with the Ethereum network. - * @param orders A non-empty array of objects that conform to SignedOrder. All orders must have the same makerAssetData and takerAssetData (WETH). - * @param feeOrders A array of objects that conform to SignedOrder. All orders must have the same makerAssetData (ZRX) and takerAssetData (WETH). Defaults to an empty array. - * @param options Initialization options for the AssetBuyer. See type definition for details. - * - * @return An instance of AssetBuyer - */ - public static getAssetBuyerForProvidedOrders( - provider: Provider, - orders: SignedOrder[], - options: Partial = {}, - ): AssetBuyer { - assert.isWeb3Provider('provider', provider); - assert.doesConformToSchema('orders', orders, schemas.signedOrdersSchema); - assert.assert(orders.length !== 0, `Expected orders to contain at least one order`); - const orderProvider = new BasicOrderProvider(orders); - const assetBuyer = new AssetBuyer(provider, orderProvider, options); - return assetBuyer; - } - /** - * Instantiates a new AssetBuyer instance given a [Standard Relayer API](https://github.com/0xProject/standard-relayer-api) endpoint - * @param provider The Provider instance you would like to use for interacting with the Ethereum network. - * @param sraApiUrl The standard relayer API base HTTP url you would like to source orders from. - * @param options Initialization options for the AssetBuyer. See type definition for details. - * - * @return An instance of AssetBuyer - */ - public static getAssetBuyerForStandardRelayerAPIUrl( - provider: Provider, - sraApiUrl: string, - options: Partial = {}, - ): AssetBuyer { - assert.isWeb3Provider('provider', provider); - assert.isWebUri('sraApiUrl', sraApiUrl); - const networkId = options.networkId || constants.DEFAULT_ASSET_BUYER_OPTS.networkId; - const orderProvider = new StandardRelayerAPIOrderProvider(sraApiUrl, networkId); - const assetBuyer = new AssetBuyer(provider, orderProvider, options); - return assetBuyer; - } - /** - * Instantiates a new AssetBuyer instance - * @param provider The Provider instance you would like to use for interacting with the Ethereum network. - * @param orderProvider An object that conforms to OrderProvider, see type for definition. - * @param options Initialization options for the AssetBuyer. See type definition for details. - * - * @return An instance of AssetBuyer - */ - constructor(provider: Provider, orderProvider: OrderProvider, options: Partial = {}) { - const { networkId, orderRefreshIntervalMs, expiryBufferSeconds } = _.merge( - {}, - constants.DEFAULT_ASSET_BUYER_OPTS, - options, - ); - assert.isWeb3Provider('provider', provider); - assert.isValidOrderProvider('orderProvider', orderProvider); - assert.isNumber('networkId', networkId); - assert.isNumber('orderRefreshIntervalMs', orderRefreshIntervalMs); - assert.isNumber('expiryBufferSeconds', expiryBufferSeconds); - this.provider = provider; - this.orderProvider = orderProvider; - this.networkId = networkId; - this.orderRefreshIntervalMs = orderRefreshIntervalMs; - this.expiryBufferSeconds = expiryBufferSeconds; - this._contractWrappers = new ContractWrappers(this.provider, { - networkId, - }); - } - /** - * Get a `BuyQuote` containing all information relevant to fulfilling a buy given a desired assetData. - * You can then pass the `BuyQuote` to `executeBuyQuoteAsync` to execute the buy. - * @param assetData The assetData of the desired asset to buy (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). - * @param assetBuyAmount The amount of asset to buy. - * @param options Options for the request. See type definition for more information. - * - * @return An object that conforms to BuyQuote that satisfies the request. See type definition for more information. - */ - public async getBuyQuoteAsync( - assetData: string, - assetBuyAmount: BigNumber, - options: Partial = {}, - ): Promise { - const { feePercentage, shouldForceOrderRefresh, slippagePercentage } = _.merge( - {}, - constants.DEFAULT_BUY_QUOTE_REQUEST_OPTS, - options, - ); - assert.isString('assetData', assetData); - assert.isBigNumber('assetBuyAmount', assetBuyAmount); - assert.isValidPercentage('feePercentage', feePercentage); - assert.isBoolean('shouldForceOrderRefresh', shouldForceOrderRefresh); - assert.isNumber('slippagePercentage', slippagePercentage); - const zrxTokenAssetData = this._getZrxTokenAssetDataOrThrow(); - const isMakerAssetZrxToken = assetData === zrxTokenAssetData; - // get the relevant orders for the makerAsset and fees - // if the requested assetData is ZRX, don't get the fee info - const [ordersAndFillableAmounts, feeOrdersAndFillableAmounts] = await Promise.all([ - this.getOrdersAndFillableAmountsAsync(assetData, shouldForceOrderRefresh), - isMakerAssetZrxToken - ? Promise.resolve(constants.EMPTY_ORDERS_AND_FILLABLE_AMOUNTS) - : this.getOrdersAndFillableAmountsAsync(zrxTokenAssetData, shouldForceOrderRefresh), - shouldForceOrderRefresh, - ]); - if (ordersAndFillableAmounts.orders.length === 0) { - throw new Error(`${AssetBuyerError.AssetUnavailable}: For assetData ${assetData}`); - } - const buyQuote = buyQuoteCalculator.calculate( - ordersAndFillableAmounts, - feeOrdersAndFillableAmounts, - assetBuyAmount, - feePercentage, - slippagePercentage, - isMakerAssetZrxToken, - ); - return buyQuote; - } - /** - * Get a `BuyQuote` containing all information relevant to fulfilling a buy given a desired ERC20 token address. - * You can then pass the `BuyQuote` to `executeBuyQuoteAsync` to execute the buy. - * @param tokenAddress The ERC20 token address. - * @param assetBuyAmount The amount of asset to buy. - * @param options Options for the request. See type definition for more information. - * - * @return An object that conforms to BuyQuote that satisfies the request. See type definition for more information. - */ - public async getBuyQuoteForERC20TokenAddressAsync( - tokenAddress: string, - assetBuyAmount: BigNumber, - options: Partial = {}, - ): Promise { - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.isBigNumber('assetBuyAmount', assetBuyAmount); - const assetData = assetDataUtils.encodeERC20AssetData(tokenAddress); - const buyQuote = this.getBuyQuoteAsync(assetData, assetBuyAmount, options); - return buyQuote; - } - /** - * Returns information about available liquidity for an asset - * Does not factor in slippage or fees - * @param assetData The assetData of the desired asset to buy (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). - * @param options Options for the request. See type definition for more information. - * - * @return An object that conforms to LiquidityForAssetData that satisfies the request. See type definition for more information. - */ - public async getLiquidityForAssetDataAsync( - assetData: string, - options: Partial = {}, - ): Promise { - const shouldForceOrderRefresh = - options.shouldForceOrderRefresh !== undefined ? options.shouldForceOrderRefresh : false; - assetDataUtils.decodeAssetDataOrThrow(assetData); - assert.isBoolean('options.shouldForceOrderRefresh', shouldForceOrderRefresh); - - const assetPairs = await this.orderProvider.getAvailableMakerAssetDatasAsync(assetData); - const etherTokenAssetData = this._getEtherTokenAssetDataOrThrow(); - if (!assetPairs.includes(etherTokenAssetData)) { - return { - tokensAvailableInBaseUnits: new BigNumber(0), - ethValueAvailableInWei: new BigNumber(0), - }; - } - - const ordersAndFillableAmounts = await this.getOrdersAndFillableAmountsAsync( - assetData, - shouldForceOrderRefresh, - ); - - return calculateLiquidity(ordersAndFillableAmounts); - } - - /** - * Given a BuyQuote and desired rate, attempt to execute the buy. - * @param buyQuote An object that conforms to BuyQuote. See type definition for more information. - * @param options Options for the execution of the BuyQuote. See type definition for more information. - * - * @return A promise of the txHash. - */ - public async executeBuyQuoteAsync( - buyQuote: BuyQuote, - options: Partial = {}, - ): Promise { - const { ethAmount, takerAddress, feeRecipient, gasLimit, gasPrice } = _.merge( - {}, - constants.DEFAULT_BUY_QUOTE_EXECUTION_OPTS, - options, - ); - assert.isValidBuyQuote('buyQuote', buyQuote); - if (!_.isUndefined(ethAmount)) { - assert.isBigNumber('ethAmount', ethAmount); - } - if (!_.isUndefined(takerAddress)) { - assert.isETHAddressHex('takerAddress', takerAddress); - } - assert.isETHAddressHex('feeRecipient', feeRecipient); - if (!_.isUndefined(gasLimit)) { - assert.isNumber('gasLimit', gasLimit); - } - if (!_.isUndefined(gasPrice)) { - assert.isBigNumber('gasPrice', gasPrice); - } - const { orders, feeOrders, feePercentage, assetBuyAmount, worstCaseQuoteInfo } = buyQuote; - // if no takerAddress is provided, try to get one from the provider - let finalTakerAddress; - if (!_.isUndefined(takerAddress)) { - finalTakerAddress = takerAddress; - } else { - const web3Wrapper = new Web3Wrapper(this.provider); - const availableAddresses = await web3Wrapper.getAvailableAddressesAsync(); - const firstAvailableAddress = _.head(availableAddresses); - if (!_.isUndefined(firstAvailableAddress)) { - finalTakerAddress = firstAvailableAddress; - } else { - throw new Error(AssetBuyerError.NoAddressAvailable); - } - } - try { - // if no ethAmount is provided, default to the worst ethAmount from buyQuote - const txHash = await this._contractWrappers.forwarder.marketBuyOrdersWithEthAsync( - orders, - assetBuyAmount, - finalTakerAddress, - ethAmount || worstCaseQuoteInfo.totalEthAmount, - feeOrders, - feePercentage, - feeRecipient, - { - gasLimit, - gasPrice, - shouldValidate: true, - }, - ); - return txHash; - } catch (err) { - if (_.includes(err.message, ContractWrappersError.SignatureRequestDenied)) { - throw new Error(AssetBuyerError.SignatureRequestDenied); - } else if (_.includes(err.message, ForwarderWrapperError.CompleteFillFailed)) { - throw new Error(AssetBuyerError.TransactionValueTooLow); - } else { - throw err; - } - } - } - /** - * Get the asset data of all assets that are purchaseable with ether token (wETH) in the order provider passed in at init. - * - * @return An array of asset data strings that can be purchased using wETH. - */ - public async getAvailableAssetDatasAsync(): Promise { - const etherTokenAssetData = this._getEtherTokenAssetDataOrThrow(); - return this.orderProvider.getAvailableMakerAssetDatasAsync(etherTokenAssetData); - } - /** - * Grab orders from the map, if there is a miss or it is time to refresh, fetch and process the orders - * @param assetData The assetData of the desired asset to buy (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). - * @param shouldForceOrderRefresh If set to true, new orders and state will be fetched instead of waiting for the next orderRefreshIntervalMs. - */ - public async getOrdersAndFillableAmountsAsync( - assetData: string, - shouldForceOrderRefresh: boolean, - ): Promise { - // try to get ordersEntry from the map - const ordersEntryIfExists = this._ordersEntryMap[assetData]; - // we should refresh if: - // we do not have any orders OR - // we are forced to OR - // we have some last refresh time AND that time was sufficiently long ago - const shouldRefresh = - _.isUndefined(ordersEntryIfExists) || - shouldForceOrderRefresh || - // tslint:disable:restrict-plus-operands - ordersEntryIfExists.lastRefreshTime + this.orderRefreshIntervalMs < Date.now(); - if (!shouldRefresh) { - const result = ordersEntryIfExists.ordersAndFillableAmounts; - return result; - } - const etherTokenAssetData = this._getEtherTokenAssetDataOrThrow(); - const zrxTokenAssetData = this._getZrxTokenAssetDataOrThrow(); - // construct orderProvider request - const orderProviderRequest = { - makerAssetData: assetData, - takerAssetData: etherTokenAssetData, - networkId: this.networkId, - }; - const request = orderProviderRequest; - // get provider response - const response = await this.orderProvider.getOrdersAsync(request); - // since the order provider is an injected dependency, validate that it respects the API - // ie. it should only return maker/taker assetDatas that are specified - orderProviderResponseProcessor.throwIfInvalidResponse(response, request); - // process the responses into one object - const isMakerAssetZrxToken = assetData === zrxTokenAssetData; - const ordersAndFillableAmounts = await orderProviderResponseProcessor.processAsync( - response, - isMakerAssetZrxToken, - this.expiryBufferSeconds, - this._contractWrappers.orderValidator, - ); - const lastRefreshTime = Date.now(); - const updatedOrdersEntry = { - ordersAndFillableAmounts, - lastRefreshTime, - }; - this._ordersEntryMap[assetData] = updatedOrdersEntry; - return ordersAndFillableAmounts; - } - /** - * Get the assetData that represents the WETH token. - * Will throw if WETH does not exist for the current network. - */ - private _getEtherTokenAssetDataOrThrow(): string { - return assetDataUtils.getEtherTokenAssetData(this._contractWrappers); - } - /** - * Get the assetData that represents the ZRX token. - * Will throw if ZRX does not exist for the current network. - */ - private _getZrxTokenAssetDataOrThrow(): string { - return this._contractWrappers.exchange.getZRXAssetData(); - } -} diff --git a/packages/asset-buyer/src/constants.ts b/packages/asset-buyer/src/constants.ts deleted file mode 100644 index c0e1bf27d..000000000 --- a/packages/asset-buyer/src/constants.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; - -import { AssetBuyerOpts, BuyQuoteExecutionOpts, BuyQuoteRequestOpts, OrdersAndFillableAmounts } from './types'; - -const NULL_ADDRESS = '0x0000000000000000000000000000000000000000'; -const MAINNET_NETWORK_ID = 1; - -const DEFAULT_ASSET_BUYER_OPTS: AssetBuyerOpts = { - networkId: MAINNET_NETWORK_ID, - orderRefreshIntervalMs: 10000, // 10 seconds - expiryBufferSeconds: 120, // 2 minutes -}; - -const DEFAULT_BUY_QUOTE_REQUEST_OPTS: BuyQuoteRequestOpts = { - feePercentage: 0, - shouldForceOrderRefresh: false, - slippagePercentage: 0.2, // 20% slippage protection -}; - -// Other default values are dynamically determined -const DEFAULT_BUY_QUOTE_EXECUTION_OPTS: BuyQuoteExecutionOpts = { - feeRecipient: NULL_ADDRESS, -}; - -const EMPTY_ORDERS_AND_FILLABLE_AMOUNTS: OrdersAndFillableAmounts = { - orders: [] as SignedOrder[], - remainingFillableMakerAssetAmounts: [] as BigNumber[], -}; - -export const constants = { - ZERO_AMOUNT: new BigNumber(0), - NULL_ADDRESS, - MAINNET_NETWORK_ID, - ETHER_TOKEN_DECIMALS: 18, - DEFAULT_ASSET_BUYER_OPTS, - DEFAULT_BUY_QUOTE_EXECUTION_OPTS, - DEFAULT_BUY_QUOTE_REQUEST_OPTS, - EMPTY_ORDERS_AND_FILLABLE_AMOUNTS, -}; diff --git a/packages/asset-buyer/src/errors.ts b/packages/asset-buyer/src/errors.ts deleted file mode 100644 index ec5fe548c..000000000 --- a/packages/asset-buyer/src/errors.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { BigNumber } from '@0x/utils'; - -import { AssetBuyerError } from './types'; - -/** - * Error class representing insufficient asset liquidity - */ -export class InsufficientAssetLiquidityError extends Error { - /** - * The amount availabe to fill (in base units) factoring in slippage. - */ - public amountAvailableToFill: BigNumber; - /** - * @param amountAvailableToFill The amount availabe to fill (in base units) factoring in slippage - */ - constructor(amountAvailableToFill: BigNumber) { - super(AssetBuyerError.InsufficientAssetLiquidity); - this.amountAvailableToFill = amountAvailableToFill; - // Setting prototype so instanceof works. See https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work - Object.setPrototypeOf(this, InsufficientAssetLiquidityError.prototype); - } -} diff --git a/packages/asset-buyer/src/globals.d.ts b/packages/asset-buyer/src/globals.d.ts deleted file mode 100644 index 94e63a32d..000000000 --- a/packages/asset-buyer/src/globals.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module '*.json' { - const json: any; - /* tslint:disable */ - export default json; - /* tslint:enable */ -} diff --git a/packages/asset-buyer/src/index.ts b/packages/asset-buyer/src/index.ts deleted file mode 100644 index f69cfad69..000000000 --- a/packages/asset-buyer/src/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -export { - JSONRPCRequestPayload, - JSONRPCResponsePayload, - JSONRPCResponseError, - JSONRPCErrorCallback, - Provider, -} from 'ethereum-types'; -export { SignedOrder } from '@0x/types'; -export { BigNumber } from '@0x/utils'; - -export { AssetBuyer } from './asset_buyer'; -export { InsufficientAssetLiquidityError } from './errors'; -export { BasicOrderProvider } from './order_providers/basic_order_provider'; -export { StandardRelayerAPIOrderProvider } from './order_providers/standard_relayer_api_order_provider'; -export { - AssetBuyerError, - AssetBuyerOpts, - BuyQuote, - BuyQuoteExecutionOpts, - BuyQuoteInfo, - BuyQuoteRequestOpts, - LiquidityForAssetData, - LiquidityRequestOpts, - OrdersAndFillableAmounts, - OrderProvider, - OrderProviderRequest, - OrderProviderResponse, - SignedOrderWithRemainingFillableMakerAssetAmount, -} from './types'; diff --git a/packages/asset-buyer/src/order_providers/basic_order_provider.ts b/packages/asset-buyer/src/order_providers/basic_order_provider.ts deleted file mode 100644 index 76685f27a..000000000 --- a/packages/asset-buyer/src/order_providers/basic_order_provider.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { schemas } from '@0x/json-schemas'; -import { SignedOrder } from '@0x/types'; -import * as _ from 'lodash'; - -import { OrderProvider, OrderProviderRequest, OrderProviderResponse } from '../types'; -import { assert } from '../utils/assert'; - -export class BasicOrderProvider implements OrderProvider { - public readonly orders: SignedOrder[]; - /** - * Instantiates a new BasicOrderProvider instance - * @param orders An array of objects that conform to SignedOrder to fetch from. - * @return An instance of BasicOrderProvider - */ - constructor(orders: SignedOrder[]) { - assert.doesConformToSchema('orders', orders, schemas.signedOrdersSchema); - this.orders = orders; - } - /** - * Given an object that conforms to OrderFetcherRequest, return the corresponding OrderProviderResponse that satisfies the request. - * @param orderProviderRequest An instance of OrderFetcherRequest. See type for more information. - * @return An instance of OrderProviderResponse. See type for more information. - */ - public async getOrdersAsync(orderProviderRequest: OrderProviderRequest): Promise { - assert.isValidOrderProviderRequest('orderProviderRequest', orderProviderRequest); - const { makerAssetData, takerAssetData } = orderProviderRequest; - const orders = _.filter(this.orders, order => { - return order.makerAssetData === makerAssetData && order.takerAssetData === takerAssetData; - }); - return { orders }; - } - /** - * Given a taker asset data string, return all availabled paired maker asset data strings. - * @param takerAssetData A string representing the taker asset data. - * @return An array of asset data strings that can be purchased using takerAssetData. - */ - public async getAvailableMakerAssetDatasAsync(takerAssetData: string): Promise { - const ordersWithTakerAssetData = _.filter(this.orders, { takerAssetData }); - return _.map(ordersWithTakerAssetData, order => order.makerAssetData); - } -} diff --git a/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts b/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts deleted file mode 100644 index 813c9923b..000000000 --- a/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { HttpClient } from '@0x/connect'; -import { APIOrder, AssetPairsResponse, OrderbookResponse } from '@0x/types'; -import * as _ from 'lodash'; - -import { - AssetBuyerError, - OrderProvider, - OrderProviderRequest, - OrderProviderResponse, - SignedOrderWithRemainingFillableMakerAssetAmount, -} from '../types'; -import { assert } from '../utils/assert'; -import { orderUtils } from '../utils/order_utils'; - -export class StandardRelayerAPIOrderProvider implements OrderProvider { - public readonly apiUrl: string; - public readonly networkId: number; - private readonly _sraClient: HttpClient; - /** - * Given an array of APIOrder objects from a standard relayer api, return an array - * of SignedOrderWithRemainingFillableMakerAssetAmounts - */ - private static _getSignedOrderWithRemainingFillableMakerAssetAmountFromApi( - apiOrders: APIOrder[], - ): SignedOrderWithRemainingFillableMakerAssetAmount[] { - const result = _.map(apiOrders, apiOrder => { - const { order, metaData } = apiOrder; - // calculate remainingFillableMakerAssetAmount from api metadata, else assume order is completely fillable - const remainingFillableTakerAssetAmount = _.get( - metaData, - 'remainingTakerAssetAmount', - order.takerAssetAmount, - ); - const remainingFillableMakerAssetAmount = orderUtils.getRemainingMakerAmount( - order, - remainingFillableTakerAssetAmount, - ); - const newOrder = { - ...order, - remainingFillableMakerAssetAmount, - }; - return newOrder; - }); - return result; - } - /** - * Instantiates a new StandardRelayerAPIOrderProvider instance - * @param apiUrl The standard relayer API base HTTP url you would like to source orders from. - * @param networkId The ethereum network id. - * @return An instance of StandardRelayerAPIOrderProvider - */ - constructor(apiUrl: string, networkId: number) { - assert.isWebUri('apiUrl', apiUrl); - assert.isNumber('networkId', networkId); - this.apiUrl = apiUrl; - this.networkId = networkId; - this._sraClient = new HttpClient(apiUrl); - } - /** - * Given an object that conforms to OrderProviderRequest, return the corresponding OrderProviderResponse that satisfies the request. - * @param orderProviderRequest An instance of OrderProviderRequest. See type for more information. - * @return An instance of OrderProviderResponse. See type for more information. - */ - public async getOrdersAsync(orderProviderRequest: OrderProviderRequest): Promise { - assert.isValidOrderProviderRequest('orderProviderRequest', orderProviderRequest); - const { makerAssetData, takerAssetData } = orderProviderRequest; - const orderbookRequest = { baseAssetData: makerAssetData, quoteAssetData: takerAssetData }; - const requestOpts = { networkId: this.networkId }; - let orderbook: OrderbookResponse; - try { - orderbook = await this._sraClient.getOrderbookAsync(orderbookRequest, requestOpts); - } catch (err) { - throw new Error(AssetBuyerError.StandardRelayerApiError); - } - const apiOrders = orderbook.asks.records; - const orders = StandardRelayerAPIOrderProvider._getSignedOrderWithRemainingFillableMakerAssetAmountFromApi( - apiOrders, - ); - return { - orders, - }; - } - /** - * Given a taker asset data string, return all availabled paired maker asset data strings. - * @param takerAssetData A string representing the taker asset data. - * @return An array of asset data strings that can be purchased using takerAssetData. - */ - public async getAvailableMakerAssetDatasAsync(takerAssetData: string): Promise { - // Return a maximum of 1000 asset datas - const maxPerPage = 1000; - const requestOpts = { networkId: this.networkId, perPage: maxPerPage }; - const assetPairsRequest = { assetDataA: takerAssetData }; - const fullRequest = { - ...requestOpts, - ...assetPairsRequest, - }; - let response: AssetPairsResponse; - try { - response = await this._sraClient.getAssetPairsAsync(fullRequest); - } catch (err) { - throw new Error(AssetBuyerError.StandardRelayerApiError); - } - return _.map(response.records, item => { - if (item.assetDataA.assetData === takerAssetData) { - return item.assetDataB.assetData; - } else { - return item.assetDataA.assetData; - } - }); - } -} diff --git a/packages/asset-buyer/src/types.ts b/packages/asset-buyer/src/types.ts deleted file mode 100644 index 46a2338ce..000000000 --- a/packages/asset-buyer/src/types.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; - -/** - * makerAssetData: The assetData representing the desired makerAsset. - * takerAssetData: The assetData representing the desired takerAsset. - * networkId: The networkId that the desired orders should be for. - */ -export interface OrderProviderRequest { - makerAssetData: string; - takerAssetData: string; -} - -/** - * orders: An array of orders with optional remaining fillable makerAsset amounts. See type for more info. - */ -export interface OrderProviderResponse { - orders: SignedOrderWithRemainingFillableMakerAssetAmount[]; -} - -/** - * A normal SignedOrder with one extra optional property `remainingFillableMakerAssetAmount` - * remainingFillableMakerAssetAmount: The amount of the makerAsset that is available to be filled - */ -export interface SignedOrderWithRemainingFillableMakerAssetAmount extends SignedOrder { - remainingFillableMakerAssetAmount?: BigNumber; -} -/** - * gerOrdersAsync: Given an OrderProviderRequest, get an OrderProviderResponse. - * getAvailableMakerAssetDatasAsync: Given a taker asset data string, return all availabled paired maker asset data strings. - */ -export interface OrderProvider { - getOrdersAsync: (orderProviderRequest: OrderProviderRequest) => Promise; - getAvailableMakerAssetDatasAsync: (takerAssetData: string) => Promise; -} - -/** - * assetData: String that represents a specific asset (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). - * assetBuyAmount: The amount of asset to buy. - * orders: An array of objects conforming to SignedOrder. These orders can be used to cover the requested assetBuyAmount plus slippage. - * feeOrders: An array of objects conforming to SignedOrder. These orders can be used to cover the fees for the orders param above. - * feePercentage: Optional affiliate fee percentage used to calculate the eth amounts above. - * bestCaseQuoteInfo: Info about the best case price for the asset. - * worstCaseQuoteInfo: Info about the worst case price for the asset. - */ -export interface BuyQuote { - assetData: string; - assetBuyAmount: BigNumber; - orders: SignedOrder[]; - feeOrders: SignedOrder[]; - feePercentage?: number; - bestCaseQuoteInfo: BuyQuoteInfo; - worstCaseQuoteInfo: BuyQuoteInfo; -} - -/** - * assetEthAmount: The amount of eth required to pay for the requested asset. - * feeEthAmount: The amount of eth required to pay the affiliate fee. - * totalEthAmount: The total amount of eth required to complete the buy (filling orders, feeOrders, and paying affiliate fee). - */ -export interface BuyQuoteInfo { - assetEthAmount: BigNumber; - feeEthAmount: BigNumber; - totalEthAmount: BigNumber; -} - -/** - * feePercentage: The affiliate fee percentage. Defaults to 0. - * shouldForceOrderRefresh: If set to true, new orders and state will be fetched instead of waiting for the next orderRefreshIntervalMs. Defaults to false. - * slippagePercentage: The percentage buffer to add to account for slippage. Affects max ETH price estimates. Defaults to 0.2 (20%). - */ -export interface BuyQuoteRequestOpts { - feePercentage: number; - shouldForceOrderRefresh: boolean; - slippagePercentage: number; -} - -/* - * Options for checking liquidity - * - * shouldForceOrderRefresh: If set to true, new orders and state will be fetched instead of waiting for the next orderRefreshIntervalMs. Defaults to false. - */ -export type LiquidityRequestOpts = Pick; - -/** - * ethAmount: The desired amount of eth to spend. Defaults to buyQuote.worstCaseQuoteInfo.totalEthAmount. - * takerAddress: The address to perform the buy. Defaults to the first available address from the provider. - * gasLimit: The amount of gas to send with a transaction (in Gwei). Defaults to an eth_estimateGas rpc call. - * gasPrice: Gas price in Wei to use for a transaction - * feeRecipient: The address where affiliate fees are sent. Defaults to null address (0x000...000). - */ -export interface BuyQuoteExecutionOpts { - ethAmount?: BigNumber; - takerAddress?: string; - gasLimit?: number; - gasPrice?: BigNumber; - feeRecipient: string; -} - -/** - * networkId: The ethereum network id. Defaults to 1 (mainnet). - * orderRefreshIntervalMs: The interval in ms that getBuyQuoteAsync should trigger an refresh of orders and order states. Defaults to 10000ms (10s). - * expiryBufferSeconds: The number of seconds to add when calculating whether an order is expired or not. Defaults to 300s (5m). - */ -export interface AssetBuyerOpts { - networkId: number; - orderRefreshIntervalMs: number; - expiryBufferSeconds: number; -} - -/** - * Possible error messages thrown by an AssetBuyer instance or associated static methods. - */ -export enum AssetBuyerError { - NoEtherTokenContractFound = 'NO_ETHER_TOKEN_CONTRACT_FOUND', - NoZrxTokenContractFound = 'NO_ZRX_TOKEN_CONTRACT_FOUND', - StandardRelayerApiError = 'STANDARD_RELAYER_API_ERROR', - InsufficientAssetLiquidity = 'INSUFFICIENT_ASSET_LIQUIDITY', - InsufficientZrxLiquidity = 'INSUFFICIENT_ZRX_LIQUIDITY', - NoAddressAvailable = 'NO_ADDRESS_AVAILABLE', - InvalidOrderProviderResponse = 'INVALID_ORDER_PROVIDER_RESPONSE', - AssetUnavailable = 'ASSET_UNAVAILABLE', - SignatureRequestDenied = 'SIGNATURE_REQUEST_DENIED', - TransactionValueTooLow = 'TRANSACTION_VALUE_TOO_LOW', -} - -/** - * orders: An array of signed orders - * remainingFillableMakerAssetAmounts: A list of fillable amounts for the signed orders. The index of an item in the array associates the amount with the corresponding order. - */ -export interface OrdersAndFillableAmounts { - orders: SignedOrder[]; - remainingFillableMakerAssetAmounts: BigNumber[]; -} - -/** - * Represents available liquidity for a given assetData - */ -export interface LiquidityForAssetData { - tokensAvailableInBaseUnits: BigNumber; - ethValueAvailableInWei: BigNumber; -} diff --git a/packages/asset-buyer/src/utils/assert.ts b/packages/asset-buyer/src/utils/assert.ts deleted file mode 100644 index fcf9b0d0e..000000000 --- a/packages/asset-buyer/src/utils/assert.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { assert as sharedAssert } from '@0x/assert'; -import { schemas } from '@0x/json-schemas'; -import * as _ from 'lodash'; - -import { BuyQuote, BuyQuoteInfo, OrderProvider, OrderProviderRequest } from '../types'; - -export const assert = { - ...sharedAssert, - isValidBuyQuote(variableName: string, buyQuote: BuyQuote): void { - sharedAssert.isHexString(`${variableName}.assetData`, buyQuote.assetData); - sharedAssert.doesConformToSchema(`${variableName}.orders`, buyQuote.orders, schemas.signedOrdersSchema); - sharedAssert.doesConformToSchema(`${variableName}.feeOrders`, buyQuote.feeOrders, schemas.signedOrdersSchema); - assert.isValidBuyQuoteInfo(`${variableName}.bestCaseQuoteInfo`, buyQuote.bestCaseQuoteInfo); - assert.isValidBuyQuoteInfo(`${variableName}.worstCaseQuoteInfo`, buyQuote.worstCaseQuoteInfo); - sharedAssert.isBigNumber(`${variableName}.assetBuyAmount`, buyQuote.assetBuyAmount); - if (!_.isUndefined(buyQuote.feePercentage)) { - sharedAssert.isNumber(`${variableName}.feePercentage`, buyQuote.feePercentage); - } - }, - isValidBuyQuoteInfo(variableName: string, buyQuoteInfo: BuyQuoteInfo): void { - sharedAssert.isBigNumber(`${variableName}.assetEthAmount`, buyQuoteInfo.assetEthAmount); - sharedAssert.isBigNumber(`${variableName}.feeEthAmount`, buyQuoteInfo.feeEthAmount); - sharedAssert.isBigNumber(`${variableName}.totalEthAmount`, buyQuoteInfo.totalEthAmount); - }, - isValidOrderProvider(variableName: string, orderFetcher: OrderProvider): void { - sharedAssert.isFunction(`${variableName}.getOrdersAsync`, orderFetcher.getOrdersAsync); - }, - isValidOrderProviderRequest(variableName: string, orderFetcherRequest: OrderProviderRequest): void { - sharedAssert.isHexString(`${variableName}.makerAssetData`, orderFetcherRequest.makerAssetData); - sharedAssert.isHexString(`${variableName}.takerAssetData`, orderFetcherRequest.takerAssetData); - }, - isValidPercentage(variableName: string, percentage: number): void { - assert.isNumber(variableName, percentage); - assert.assert( - percentage >= 0 && percentage <= 1, - `Expected ${variableName} to be between 0 and 1, but is ${percentage}`, - ); - }, -}; diff --git a/packages/asset-buyer/src/utils/asset_data_utils.ts b/packages/asset-buyer/src/utils/asset_data_utils.ts deleted file mode 100644 index 70f646902..000000000 --- a/packages/asset-buyer/src/utils/asset_data_utils.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ContractWrappers } from '@0x/contract-wrappers'; -import { assetDataUtils as sharedAssetDataUtils } from '@0x/order-utils'; -import * as _ from 'lodash'; - -export const assetDataUtils = { - ...sharedAssetDataUtils, - getEtherTokenAssetData(contractWrappers: ContractWrappers): string { - const etherTokenAddress = contractWrappers.forwarder.etherTokenAddress; - const etherTokenAssetData = sharedAssetDataUtils.encodeERC20AssetData(etherTokenAddress); - return etherTokenAssetData; - }, -}; diff --git a/packages/asset-buyer/src/utils/buy_quote_calculator.ts b/packages/asset-buyer/src/utils/buy_quote_calculator.ts deleted file mode 100644 index 125841094..000000000 --- a/packages/asset-buyer/src/utils/buy_quote_calculator.ts +++ /dev/null @@ -1,221 +0,0 @@ -import { marketUtils, SignedOrder } from '@0x/order-utils'; -import { BigNumber } from '@0x/utils'; -import * as _ from 'lodash'; - -import { constants } from '../constants'; -import { InsufficientAssetLiquidityError } from '../errors'; -import { AssetBuyerError, BuyQuote, BuyQuoteInfo, OrdersAndFillableAmounts } from '../types'; - -import { orderUtils } from './order_utils'; - -// Calculates a buy quote for orders that have WETH as the takerAsset -export const buyQuoteCalculator = { - calculate( - ordersAndFillableAmounts: OrdersAndFillableAmounts, - feeOrdersAndFillableAmounts: OrdersAndFillableAmounts, - assetBuyAmount: BigNumber, - feePercentage: number, - slippagePercentage: number, - isMakerAssetZrxToken: boolean, - ): BuyQuote { - const orders = ordersAndFillableAmounts.orders; - const remainingFillableMakerAssetAmounts = ordersAndFillableAmounts.remainingFillableMakerAssetAmounts; - const feeOrders = feeOrdersAndFillableAmounts.orders; - const remainingFillableFeeAmounts = feeOrdersAndFillableAmounts.remainingFillableMakerAssetAmounts; - const slippageBufferAmount = assetBuyAmount.multipliedBy(slippagePercentage).integerValue(); - // find the orders that cover the desired assetBuyAmount (with slippage) - const { - resultOrders, - remainingFillAmount, - ordersRemainingFillableMakerAssetAmounts, - } = marketUtils.findOrdersThatCoverMakerAssetFillAmount(orders, assetBuyAmount, { - remainingFillableMakerAssetAmounts, - slippageBufferAmount, - }); - // if we do not have enough orders to cover the desired assetBuyAmount, throw - if (remainingFillAmount.gt(constants.ZERO_AMOUNT)) { - // We needed the amount they requested to buy, plus the amount for slippage - const totalAmountRequested = assetBuyAmount.plus(slippageBufferAmount); - const amountAbleToFill = totalAmountRequested.minus(remainingFillAmount); - // multiplierNeededWithSlippage represents what we need to multiply the assetBuyAmount by - // in order to get the total amount needed considering slippage - // i.e. if slippagePercent was 0.2 (20%), multiplierNeededWithSlippage would be 1.2 - const multiplierNeededWithSlippage = new BigNumber(1).plus(slippagePercentage); - // Given amountAvailableToFillConsideringSlippage * multiplierNeededWithSlippage = amountAbleToFill - // We divide amountUnableToFill by multiplierNeededWithSlippage to determine amountAvailableToFillConsideringSlippage - const amountAvailableToFillConsideringSlippage = amountAbleToFill - .div(multiplierNeededWithSlippage) - .integerValue(BigNumber.ROUND_FLOOR); - - throw new InsufficientAssetLiquidityError(amountAvailableToFillConsideringSlippage); - } - // if we are not buying ZRX: - // given the orders calculated above, find the fee-orders that cover the desired assetBuyAmount (with slippage) - // TODO(bmillman): optimization - // update this logic to find the minimum amount of feeOrders to cover the worst case as opposed to - // finding order that cover all fees, this will help with estimating ETH and minimizing gas usage - let resultFeeOrders = [] as SignedOrder[]; - let feeOrdersRemainingFillableMakerAssetAmounts = [] as BigNumber[]; - if (!isMakerAssetZrxToken) { - const feeOrdersAndRemainingFeeAmount = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( - resultOrders, - feeOrders, - { - remainingFillableMakerAssetAmounts: ordersRemainingFillableMakerAssetAmounts, - remainingFillableFeeAmounts, - }, - ); - // if we do not have enough feeOrders to cover the fees, throw - if (feeOrdersAndRemainingFeeAmount.remainingFeeAmount.gt(constants.ZERO_AMOUNT)) { - throw new Error(AssetBuyerError.InsufficientZrxLiquidity); - } - resultFeeOrders = feeOrdersAndRemainingFeeAmount.resultFeeOrders; - feeOrdersRemainingFillableMakerAssetAmounts = - feeOrdersAndRemainingFeeAmount.feeOrdersRemainingFillableMakerAssetAmounts; - } - - // assetData information for the result - const assetData = orders[0].makerAssetData; - // compile the resulting trimmed set of orders for makerAsset and feeOrders that are needed for assetBuyAmount - const trimmedOrdersAndFillableAmounts: OrdersAndFillableAmounts = { - orders: resultOrders, - remainingFillableMakerAssetAmounts: ordersRemainingFillableMakerAssetAmounts, - }; - const trimmedFeeOrdersAndFillableAmounts: OrdersAndFillableAmounts = { - orders: resultFeeOrders, - remainingFillableMakerAssetAmounts: feeOrdersRemainingFillableMakerAssetAmounts, - }; - const bestCaseQuoteInfo = calculateQuoteInfo( - trimmedOrdersAndFillableAmounts, - trimmedFeeOrdersAndFillableAmounts, - assetBuyAmount, - feePercentage, - isMakerAssetZrxToken, - ); - // in order to calculate the maxRate, reverse the ordersAndFillableAmounts such that they are sorted from worst rate to best rate - const worstCaseQuoteInfo = calculateQuoteInfo( - reverseOrdersAndFillableAmounts(trimmedOrdersAndFillableAmounts), - reverseOrdersAndFillableAmounts(trimmedFeeOrdersAndFillableAmounts), - assetBuyAmount, - feePercentage, - isMakerAssetZrxToken, - ); - return { - assetData, - orders: resultOrders, - feeOrders: resultFeeOrders, - bestCaseQuoteInfo, - worstCaseQuoteInfo, - assetBuyAmount, - feePercentage, - }; - }, -}; - -function calculateQuoteInfo( - ordersAndFillableAmounts: OrdersAndFillableAmounts, - feeOrdersAndFillableAmounts: OrdersAndFillableAmounts, - assetBuyAmount: BigNumber, - feePercentage: number, - isMakerAssetZrxToken: boolean, -): BuyQuoteInfo { - // find the total eth and zrx needed to buy assetAmount from the resultOrders from left to right - let assetEthAmount = constants.ZERO_AMOUNT; - let zrxEthAmount = constants.ZERO_AMOUNT; - if (isMakerAssetZrxToken) { - assetEthAmount = findEthAmountNeededToBuyZrx(ordersAndFillableAmounts, assetBuyAmount); - } else { - // find eth and zrx amounts needed to buy - const ethAndZrxAmountToBuyAsset = findEthAndZrxAmountNeededToBuyAsset(ordersAndFillableAmounts, assetBuyAmount); - assetEthAmount = ethAndZrxAmountToBuyAsset[0]; - const zrxAmountToBuyAsset = ethAndZrxAmountToBuyAsset[1]; - // find eth amount needed to buy zrx - zrxEthAmount = findEthAmountNeededToBuyZrx(feeOrdersAndFillableAmounts, zrxAmountToBuyAsset); - } - // eth amount needed to buy the affiliate fee - const affiliateFeeEthAmount = assetEthAmount.multipliedBy(feePercentage).integerValue(BigNumber.ROUND_CEIL); - // eth amount needed for fees is the sum of affiliate fee and zrx fee - const feeEthAmount = affiliateFeeEthAmount.plus(zrxEthAmount); - // eth amount needed in total is the sum of the amount needed for the asset and the amount needed for fees - const totalEthAmount = assetEthAmount.plus(feeEthAmount); - return { - assetEthAmount, - feeEthAmount, - totalEthAmount, - }; -} - -// given an OrdersAndFillableAmounts, reverse the orders and remainingFillableMakerAssetAmounts properties -function reverseOrdersAndFillableAmounts(ordersAndFillableAmounts: OrdersAndFillableAmounts): OrdersAndFillableAmounts { - const ordersCopy = _.clone(ordersAndFillableAmounts.orders); - const remainingFillableMakerAssetAmountsCopy = _.clone(ordersAndFillableAmounts.remainingFillableMakerAssetAmounts); - return { - orders: ordersCopy.reverse(), - remainingFillableMakerAssetAmounts: remainingFillableMakerAssetAmountsCopy.reverse(), - }; -} - -function findEthAmountNeededToBuyZrx( - feeOrdersAndFillableAmounts: OrdersAndFillableAmounts, - zrxBuyAmount: BigNumber, -): BigNumber { - const { orders, remainingFillableMakerAssetAmounts } = feeOrdersAndFillableAmounts; - const result = _.reduce( - orders, - (acc, order, index) => { - const { totalEthAmount, remainingZrxBuyAmount } = acc; - const remainingFillableMakerAssetAmount = remainingFillableMakerAssetAmounts[index]; - const makerFillAmount = BigNumber.min(remainingZrxBuyAmount, remainingFillableMakerAssetAmount); - const [takerFillAmount, adjustedMakerFillAmount] = orderUtils.getTakerFillAmountForFeeOrder( - order, - makerFillAmount, - ); - const extraFeeAmount = remainingFillableMakerAssetAmount.isGreaterThanOrEqualTo(adjustedMakerFillAmount) - ? constants.ZERO_AMOUNT - : adjustedMakerFillAmount.minus(makerFillAmount); - return { - totalEthAmount: totalEthAmount.plus(takerFillAmount), - remainingZrxBuyAmount: BigNumber.max( - constants.ZERO_AMOUNT, - remainingZrxBuyAmount.minus(makerFillAmount).plus(extraFeeAmount), - ), - }; - }, - { - totalEthAmount: constants.ZERO_AMOUNT, - remainingZrxBuyAmount: zrxBuyAmount, - }, - ); - return result.totalEthAmount; -} - -function findEthAndZrxAmountNeededToBuyAsset( - ordersAndFillableAmounts: OrdersAndFillableAmounts, - assetBuyAmount: BigNumber, -): [BigNumber, BigNumber] { - const { orders, remainingFillableMakerAssetAmounts } = ordersAndFillableAmounts; - const result = _.reduce( - orders, - (acc, order, index) => { - const { totalEthAmount, totalZrxAmount, remainingAssetBuyAmount } = acc; - const remainingFillableMakerAssetAmount = remainingFillableMakerAssetAmounts[index]; - const makerFillAmount = BigNumber.min(acc.remainingAssetBuyAmount, remainingFillableMakerAssetAmount); - const takerFillAmount = orderUtils.getTakerFillAmount(order, makerFillAmount); - const takerFeeAmount = orderUtils.getTakerFeeAmount(order, takerFillAmount); - return { - totalEthAmount: totalEthAmount.plus(takerFillAmount), - totalZrxAmount: totalZrxAmount.plus(takerFeeAmount), - remainingAssetBuyAmount: BigNumber.max( - constants.ZERO_AMOUNT, - remainingAssetBuyAmount.minus(makerFillAmount), - ), - }; - }, - { - totalEthAmount: constants.ZERO_AMOUNT, - totalZrxAmount: constants.ZERO_AMOUNT, - remainingAssetBuyAmount: assetBuyAmount, - }, - ); - return [result.totalEthAmount, result.totalZrxAmount]; -} diff --git a/packages/asset-buyer/src/utils/calculate_liquidity.ts b/packages/asset-buyer/src/utils/calculate_liquidity.ts deleted file mode 100644 index a8d165b4b..000000000 --- a/packages/asset-buyer/src/utils/calculate_liquidity.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { BigNumber } from '@0x/utils'; - -import { LiquidityForAssetData, OrdersAndFillableAmounts } from '../types'; - -import { orderUtils } from './order_utils'; - -export const calculateLiquidity = (ordersAndFillableAmounts: OrdersAndFillableAmounts): LiquidityForAssetData => { - const { orders, remainingFillableMakerAssetAmounts } = ordersAndFillableAmounts; - const liquidityInBigNumbers = orders.reduce( - (acc, order, curIndex) => { - const availableMakerAssetAmount = remainingFillableMakerAssetAmounts[curIndex]; - if (availableMakerAssetAmount === undefined) { - throw new Error(`No corresponding fillableMakerAssetAmounts at index ${curIndex}`); - } - - const tokensAvailableForCurrentOrder = availableMakerAssetAmount; - const ethValueAvailableForCurrentOrder = orderUtils.getTakerFillAmount(order, availableMakerAssetAmount); - return { - tokensAvailableInBaseUnits: acc.tokensAvailableInBaseUnits.plus(tokensAvailableForCurrentOrder), - ethValueAvailableInWei: acc.ethValueAvailableInWei.plus(ethValueAvailableForCurrentOrder), - }; - }, - { - tokensAvailableInBaseUnits: new BigNumber(0), - ethValueAvailableInWei: new BigNumber(0), - }, - ); - - // Turn into regular numbers - return { - tokensAvailableInBaseUnits: liquidityInBigNumbers.tokensAvailableInBaseUnits, - ethValueAvailableInWei: liquidityInBigNumbers.ethValueAvailableInWei, - }; -}; diff --git a/packages/asset-buyer/src/utils/order_provider_response_processor.ts b/packages/asset-buyer/src/utils/order_provider_response_processor.ts deleted file mode 100644 index f08cd6150..000000000 --- a/packages/asset-buyer/src/utils/order_provider_response_processor.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { OrderAndTraderInfo, OrderStatus, OrderValidatorWrapper } from '@0x/contract-wrappers'; -import { sortingUtils } from '@0x/order-utils'; -import { RemainingFillableCalculator } from '@0x/order-utils/lib/src/remaining_fillable_calculator'; -import { SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import * as _ from 'lodash'; - -import { constants } from '../constants'; -import { - AssetBuyerError, - OrderProviderRequest, - OrderProviderResponse, - OrdersAndFillableAmounts, - SignedOrderWithRemainingFillableMakerAssetAmount, -} from '../types'; - -import { orderUtils } from './order_utils'; - -export const orderProviderResponseProcessor = { - throwIfInvalidResponse(response: OrderProviderResponse, request: OrderProviderRequest): void { - const { makerAssetData, takerAssetData } = request; - _.forEach(response.orders, order => { - if (order.makerAssetData !== makerAssetData || order.takerAssetData !== takerAssetData) { - throw new Error(AssetBuyerError.InvalidOrderProviderResponse); - } - }); - }, - /** - * Take the responses for the target orders to buy and fee orders and process them. - * Processing includes: - * - Drop orders that are expired or not open orders (null taker address) - * - If shouldValidateOnChain, attempt to grab fillable amounts from on-chain otherwise assume completely fillable - * - Sort by rate - */ - async processAsync( - orderProviderResponse: OrderProviderResponse, - isMakerAssetZrxToken: boolean, - expiryBufferSeconds: number, - orderValidator?: OrderValidatorWrapper, - ): Promise { - // drop orders that are expired or not open - const filteredOrders = filterOutExpiredAndNonOpenOrders(orderProviderResponse.orders, expiryBufferSeconds); - // set the orders to be sorted equal to the filtered orders - let unsortedOrders = filteredOrders; - // if an orderValidator is provided, use on chain information to calculate remaining fillable makerAsset amounts - if (!_.isUndefined(orderValidator)) { - const takerAddresses = _.map(filteredOrders, () => constants.NULL_ADDRESS); - try { - const ordersAndTradersInfo = await orderValidator.getOrdersAndTradersInfoAsync( - filteredOrders, - takerAddresses, - ); - // take orders + on chain information and find the valid orders and remaining fillable maker asset amounts - unsortedOrders = getValidOrdersWithRemainingFillableMakerAssetAmountsFromOnChain( - filteredOrders, - ordersAndTradersInfo, - isMakerAssetZrxToken, - ); - } catch (err) { - // Sometimes we observe this call to orderValidator fail with response `0x` - // Because of differences in Parity / Geth implementations, its very hard to tell if this response is a "system error" - // or a revert. In this case we just swallow these errors and fallback to partial fill information from the SRA. - // TODO(bmillman): report these errors so we have an idea of how often we're getting these failures. - } - } - // sort orders by rate - // TODO(bmillman): optimization - // provide a feeRate to the sorting function to more accurately sort based on the current market for ZRX tokens - const sortedOrders = isMakerAssetZrxToken - ? sortingUtils.sortFeeOrdersByFeeAdjustedRate(unsortedOrders) - : sortingUtils.sortOrdersByFeeAdjustedRate(unsortedOrders); - // unbundle orders and fillable amounts and compile final result - const result = unbundleOrdersWithAmounts(sortedOrders); - return result; - }, -}; - -/** - * Given an array of orders, return a new array with expired and non open orders filtered out. - */ -function filterOutExpiredAndNonOpenOrders( - orders: SignedOrderWithRemainingFillableMakerAssetAmount[], - expiryBufferSeconds: number, -): SignedOrderWithRemainingFillableMakerAssetAmount[] { - const result = _.filter(orders, order => { - return orderUtils.isOpenOrder(order) && !orderUtils.willOrderExpire(order, expiryBufferSeconds); - }); - return result; -} - -/** - * Given an array of orders and corresponding on-chain infos, return a subset of the orders - * that are still fillable orders with their corresponding remainingFillableMakerAssetAmounts. - */ -function getValidOrdersWithRemainingFillableMakerAssetAmountsFromOnChain( - inputOrders: SignedOrder[], - ordersAndTradersInfo: OrderAndTraderInfo[], - isMakerAssetZrxToken: boolean, -): SignedOrderWithRemainingFillableMakerAssetAmount[] { - // iterate through the input orders and find the ones that are still fillable - // for the orders that are still fillable, calculate the remaining fillable maker asset amount - const result = _.reduce( - inputOrders, - (accOrders, order, index) => { - // get corresponding on-chain state for the order - const { orderInfo, traderInfo } = ordersAndTradersInfo[index]; - // if the order IS NOT fillable, do not add anything to the accumulations and continue iterating - if (orderInfo.orderStatus !== OrderStatus.Fillable) { - return accOrders; - } - // if the order IS fillable, add the order and calculate the remaining fillable amount - const transferrableAssetAmount = BigNumber.min(traderInfo.makerAllowance, traderInfo.makerBalance); - const transferrableFeeAssetAmount = BigNumber.min(traderInfo.makerZrxAllowance, traderInfo.makerZrxBalance); - const remainingTakerAssetAmount = order.takerAssetAmount.minus(orderInfo.orderTakerAssetFilledAmount); - const remainingMakerAssetAmount = orderUtils.getRemainingMakerAmount(order, remainingTakerAssetAmount); - const remainingFillableCalculator = new RemainingFillableCalculator( - order.makerFee, - order.makerAssetAmount, - isMakerAssetZrxToken, - transferrableAssetAmount, - transferrableFeeAssetAmount, - remainingMakerAssetAmount, - ); - const remainingFillableAmount = remainingFillableCalculator.computeRemainingFillable(); - // if the order does not have any remaining fillable makerAsset, do not add anything to the accumulations and continue iterating - if (remainingFillableAmount.lte(constants.ZERO_AMOUNT)) { - return accOrders; - } - const orderWithRemainingFillableMakerAssetAmount = { - ...order, - remainingFillableMakerAssetAmount: remainingFillableAmount, - }; - const newAccOrders = _.concat(accOrders, orderWithRemainingFillableMakerAssetAmount); - return newAccOrders; - }, - [] as SignedOrderWithRemainingFillableMakerAssetAmount[], - ); - return result; -} - -/** - * Given an array of orders with remaining fillable maker asset amounts. Unbundle into an instance of OrdersAndRemainingFillableMakerAssetAmounts. - * If an order is missing a corresponding remainingFillableMakerAssetAmount, assume it is completely fillable. - */ -function unbundleOrdersWithAmounts( - ordersWithAmounts: SignedOrderWithRemainingFillableMakerAssetAmount[], -): OrdersAndFillableAmounts { - const result = _.reduce( - ordersWithAmounts, - (acc, orderWithAmount) => { - const { orders, remainingFillableMakerAssetAmounts } = acc; - const { remainingFillableMakerAssetAmount, ...order } = orderWithAmount; - // if we are still missing a remainingFillableMakerAssetAmount, assume the order is completely fillable - const newRemainingAmount = remainingFillableMakerAssetAmount || order.makerAssetAmount; - // if remaining amount is less than or equal to zero, do not add it - if (newRemainingAmount.lte(constants.ZERO_AMOUNT)) { - return acc; - } - const newAcc = { - orders: _.concat(orders, order), - remainingFillableMakerAssetAmounts: _.concat(remainingFillableMakerAssetAmounts, newRemainingAmount), - }; - return newAcc; - }, - { - orders: [] as SignedOrder[], - remainingFillableMakerAssetAmounts: [] as BigNumber[], - }, - ); - return result; -} diff --git a/packages/asset-buyer/src/utils/order_utils.ts b/packages/asset-buyer/src/utils/order_utils.ts deleted file mode 100644 index 3ea3cafd3..000000000 --- a/packages/asset-buyer/src/utils/order_utils.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; - -import { constants } from '../constants'; - -export const orderUtils = { - isOrderExpired(order: SignedOrder): boolean { - return orderUtils.willOrderExpire(order, 0); - }, - willOrderExpire(order: SignedOrder, secondsFromNow: number): boolean { - const millisecondsInSecond = 1000; - const currentUnixTimestampSec = new BigNumber(Date.now() / millisecondsInSecond).integerValue(); - return order.expirationTimeSeconds.isLessThan(currentUnixTimestampSec.plus(secondsFromNow)); - }, - isOpenOrder(order: SignedOrder): boolean { - return order.takerAddress === constants.NULL_ADDRESS; - }, - // given a remaining amount of takerAsset, calculate how much makerAsset is available - getRemainingMakerAmount(order: SignedOrder, remainingTakerAmount: BigNumber): BigNumber { - const remainingMakerAmount = remainingTakerAmount - .times(order.makerAssetAmount) - .div(order.takerAssetAmount) - .integerValue(BigNumber.ROUND_FLOOR); - return remainingMakerAmount; - }, - // given a desired amount of makerAsset, calculate how much takerAsset is required to fill that amount - getTakerFillAmount(order: SignedOrder, makerFillAmount: BigNumber): BigNumber { - // Round up because exchange rate favors Maker - const takerFillAmount = makerFillAmount - .multipliedBy(order.takerAssetAmount) - .div(order.makerAssetAmount) - .integerValue(BigNumber.ROUND_CEIL); - return takerFillAmount; - }, - // given a desired amount of takerAsset to fill, calculate how much fee is required by the taker to fill that amount - getTakerFeeAmount(order: SignedOrder, takerFillAmount: BigNumber): BigNumber { - // Round down because Taker fee rate favors Taker - const takerFeeAmount = takerFillAmount - .multipliedBy(order.takerFee) - .div(order.takerAssetAmount) - .integerValue(BigNumber.ROUND_FLOOR); - return takerFeeAmount; - }, - // given a desired amount of takerAsset to fill, calculate how much makerAsset will be filled - getMakerFillAmount(order: SignedOrder, takerFillAmount: BigNumber): BigNumber { - // Round down because exchange rate favors Maker - const makerFillAmount = takerFillAmount - .multipliedBy(order.makerAssetAmount) - .div(order.takerAssetAmount) - .integerValue(BigNumber.ROUND_FLOOR); - return makerFillAmount; - }, - // given a desired amount of makerAsset, calculate how much fee is required by the maker to fill that amount - getMakerFeeAmount(order: SignedOrder, makerFillAmount: BigNumber): BigNumber { - // Round down because Maker fee rate favors Maker - const makerFeeAmount = makerFillAmount - .multipliedBy(order.makerFee) - .div(order.makerAssetAmount) - .integerValue(BigNumber.ROUND_FLOOR); - return makerFeeAmount; - }, - // given a desired amount of ZRX from a fee order, calculate how much takerAsset is required to fill that amount - // also calculate how much ZRX needs to be bought in order fill the desired amount + takerFee - getTakerFillAmountForFeeOrder(order: SignedOrder, makerFillAmount: BigNumber): [BigNumber, BigNumber] { - // For each unit of TakerAsset we buy (MakerAsset - TakerFee) - const adjustedTakerFillAmount = makerFillAmount - .multipliedBy(order.takerAssetAmount) - .div(order.makerAssetAmount.minus(order.takerFee)) - .integerValue(BigNumber.ROUND_CEIL); - // The amount that we buy will be greater than makerFillAmount, since we buy some amount for fees. - const adjustedMakerFillAmount = orderUtils.getMakerFillAmount(order, adjustedTakerFillAmount); - return [adjustedTakerFillAmount, adjustedMakerFillAmount]; - }, -}; diff --git a/packages/asset-buyer/test/asset_buyer_test.ts b/packages/asset-buyer/test/asset_buyer_test.ts deleted file mode 100644 index f117b4d7a..000000000 --- a/packages/asset-buyer/test/asset_buyer_test.ts +++ /dev/null @@ -1,212 +0,0 @@ -import { orderFactory } from '@0x/order-utils/lib/src/order_factory'; -import { Web3ProviderEngine } from '@0x/subproviders'; -import { SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as chai from 'chai'; -import 'mocha'; -import * as TypeMoq from 'typemoq'; - -import { AssetBuyer } from '../src'; -import { constants } from '../src/constants'; -import { LiquidityForAssetData, OrderProvider, OrdersAndFillableAmounts } from '../src/types'; - -import { chaiSetup } from './utils/chai_setup'; -import { - mockAvailableAssetDatas, - mockedAssetBuyerWithOrdersAndFillableAmounts, - orderProviderMock, -} from './utils/mocks'; - -chaiSetup.configure(); -const expect = chai.expect; - -const FAKE_SRA_URL = 'https://fakeurl.com'; -const FAKE_ASSET_DATA = '0xf47261b00000000000000000000000001dc4c1cefef38a777b15aa20260a54e584b16c48'; -const TOKEN_DECIMALS = 18; -const DAI_ASSET_DATA = '0xf47261b000000000000000000000000089d24a6b4ccb1b6faa2625fe562bdd9a23260359"'; -const WETH_ASSET_DATA = '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; -const WETH_DECIMALS = constants.ETHER_TOKEN_DECIMALS; - -const baseUnitAmount = (unitAmount: number, decimals = TOKEN_DECIMALS): BigNumber => { - return Web3Wrapper.toBaseUnitAmount(new BigNumber(unitAmount), decimals); -}; - -const expectLiquidityResult = async ( - web3Provider: Web3ProviderEngine, - orderProvider: OrderProvider, - ordersAndFillableAmounts: OrdersAndFillableAmounts, - expectedLiquidityResult: LiquidityForAssetData, -) => { - const mockedAssetBuyer = mockedAssetBuyerWithOrdersAndFillableAmounts( - web3Provider, - orderProvider, - FAKE_ASSET_DATA, - ordersAndFillableAmounts, - ); - const liquidityResult = await mockedAssetBuyer.object.getLiquidityForAssetDataAsync(FAKE_ASSET_DATA); - expect(liquidityResult).to.deep.equal(expectedLiquidityResult); -}; - -// tslint:disable:custom-no-magic-numbers -describe('AssetBuyer', () => { - describe('getLiquidityForAssetDataAsync', () => { - const mockWeb3Provider = TypeMoq.Mock.ofType(Web3ProviderEngine); - const mockOrderProvider = orderProviderMock(); - - beforeEach(() => { - mockWeb3Provider.reset(); - mockOrderProvider.reset(); - }); - - afterEach(() => { - mockWeb3Provider.verifyAll(); - mockOrderProvider.verifyAll(); - }); - - describe('validation', () => { - it('should ensure assetData is a string', async () => { - const assetBuyer = AssetBuyer.getAssetBuyerForStandardRelayerAPIUrl( - mockWeb3Provider.object, - FAKE_SRA_URL, - ); - - expect(assetBuyer.getLiquidityForAssetDataAsync(false as any)).to.be.rejectedWith( - 'Expected assetData to be of type string, encountered: false', - ); - }); - }); - - describe('asset pair not supported', () => { - it('should return 0s when no asset pair not supported', async () => { - mockAvailableAssetDatas(mockOrderProvider, FAKE_ASSET_DATA, []); - - const assetBuyer = new AssetBuyer(mockWeb3Provider.object, mockOrderProvider.object); - const liquidityResult = await assetBuyer.getLiquidityForAssetDataAsync(FAKE_ASSET_DATA); - expect(liquidityResult).to.deep.equal({ - tokensAvailableInBaseUnits: new BigNumber(0), - ethValueAvailableInWei: new BigNumber(0), - }); - }); - it('should return 0s when only other asset pair supported', async () => { - mockAvailableAssetDatas(mockOrderProvider, FAKE_ASSET_DATA, [DAI_ASSET_DATA]); - - const assetBuyer = new AssetBuyer(mockWeb3Provider.object, mockOrderProvider.object); - const liquidityResult = await assetBuyer.getLiquidityForAssetDataAsync(FAKE_ASSET_DATA); - expect(liquidityResult).to.deep.equal({ - tokensAvailableInBaseUnits: new BigNumber(0), - ethValueAvailableInWei: new BigNumber(0), - }); - }); - }); - - describe('assetData is supported', () => { - // orders - const sellTwoTokensFor1Weth: SignedOrder = orderFactory.createSignedOrderFromPartial({ - makerAssetAmount: baseUnitAmount(2), - takerAssetAmount: baseUnitAmount(1, WETH_DECIMALS), - }); - const sellTenTokensFor10Weth: SignedOrder = orderFactory.createSignedOrderFromPartial({ - makerAssetAmount: baseUnitAmount(10), - takerAssetAmount: baseUnitAmount(10, WETH_DECIMALS), - }); - - beforeEach(() => { - mockAvailableAssetDatas(mockOrderProvider, FAKE_ASSET_DATA, [WETH_ASSET_DATA]); - }); - - it('should return 0s when no orders available', async () => { - const ordersAndFillableAmounts: OrdersAndFillableAmounts = { - orders: [], - remainingFillableMakerAssetAmounts: [], - }; - const expectedResult = { - tokensAvailableInBaseUnits: new BigNumber(0), - ethValueAvailableInWei: new BigNumber(0), - }; - await expectLiquidityResult( - mockWeb3Provider.object, - mockOrderProvider.object, - ordersAndFillableAmounts, - expectedResult, - ); - }); - - it('should return correct computed value when orders provided with full fillableAmounts', async () => { - const orders: SignedOrder[] = [sellTwoTokensFor1Weth, sellTenTokensFor10Weth]; - const ordersAndFillableAmounts = { - orders: [sellTwoTokensFor1Weth, sellTenTokensFor10Weth], - remainingFillableMakerAssetAmounts: orders.map(o => o.makerAssetAmount), - }; - - const expectedTokensAvailable = orders[0].makerAssetAmount.plus(orders[1].makerAssetAmount); - const expectedEthValueAvailable = orders[0].takerAssetAmount.plus(orders[1].takerAssetAmount); - const expectedResult = { - tokensAvailableInBaseUnits: expectedTokensAvailable, - ethValueAvailableInWei: expectedEthValueAvailable, - }; - - await expectLiquidityResult( - mockWeb3Provider.object, - mockOrderProvider.object, - ordersAndFillableAmounts, - expectedResult, - ); - }); - - it('should return correct computed value with one partial fillableAmounts', async () => { - const ordersAndFillableAmounts = { - orders: [sellTwoTokensFor1Weth], - remainingFillableMakerAssetAmounts: [baseUnitAmount(1)], - }; - const expectedResult = { - tokensAvailableInBaseUnits: baseUnitAmount(1), - ethValueAvailableInWei: baseUnitAmount(0.5, WETH_DECIMALS), - }; - - await expectLiquidityResult( - mockWeb3Provider.object, - mockOrderProvider.object, - ordersAndFillableAmounts, - expectedResult, - ); - }); - - it('should return correct computed value with multiple orders and fillable amounts', async () => { - const ordersAndFillableAmounts = { - orders: [sellTwoTokensFor1Weth, sellTenTokensFor10Weth], - remainingFillableMakerAssetAmounts: [baseUnitAmount(1), baseUnitAmount(3)], - }; - const expectedResult = { - tokensAvailableInBaseUnits: baseUnitAmount(4), - ethValueAvailableInWei: baseUnitAmount(3.5, WETH_DECIMALS), - }; - - await expectLiquidityResult( - mockWeb3Provider.object, - mockOrderProvider.object, - ordersAndFillableAmounts, - expectedResult, - ); - }); - - it('should return 0s when no amounts fillable', async () => { - const ordersAndFillableAmounts = { - orders: [sellTwoTokensFor1Weth, sellTenTokensFor10Weth], - remainingFillableMakerAssetAmounts: [baseUnitAmount(0), baseUnitAmount(0)], - }; - const expectedResult = { - tokensAvailableInBaseUnits: baseUnitAmount(0), - ethValueAvailableInWei: baseUnitAmount(0, WETH_DECIMALS), - }; - - await expectLiquidityResult( - mockWeb3Provider.object, - mockOrderProvider.object, - ordersAndFillableAmounts, - expectedResult, - ); - }); - }); - }); -}); diff --git a/packages/asset-buyer/test/buy_quote_calculator_test.ts b/packages/asset-buyer/test/buy_quote_calculator_test.ts deleted file mode 100644 index 177fd8fe6..000000000 --- a/packages/asset-buyer/test/buy_quote_calculator_test.ts +++ /dev/null @@ -1,295 +0,0 @@ -import { orderFactory } from '@0x/order-utils/lib/src/order_factory'; -import { SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import * as chai from 'chai'; -import * as _ from 'lodash'; -import 'mocha'; - -import { AssetBuyerError, OrdersAndFillableAmounts } from '../src/types'; -import { buyQuoteCalculator } from '../src/utils/buy_quote_calculator'; - -import { chaiSetup } from './utils/chai_setup'; -import { testHelpers } from './utils/test_helpers'; - -chaiSetup.configure(); -const expect = chai.expect; - -// tslint:disable:custom-no-magic-numbers -describe('buyQuoteCalculator', () => { - describe('#calculate', () => { - let firstOrder: SignedOrder; - let firstRemainingFillAmount: BigNumber; - let secondOrder: SignedOrder; - let secondRemainingFillAmount: BigNumber; - let ordersAndFillableAmounts: OrdersAndFillableAmounts; - let smallFeeOrderAndFillableAmount: OrdersAndFillableAmounts; - let allFeeOrdersAndFillableAmounts: OrdersAndFillableAmounts; - beforeEach(() => { - // generate two orders for our desired maker asset - // the first order has a rate of 4 makerAsset / WETH with a takerFee of 200 ZRX and has only 200 / 400 makerAsset units left to fill (half fillable) - // the second order has a rate of 2 makerAsset / WETH with a takerFee of 100 ZRX and has 200 / 200 makerAsset units left to fill (completely fillable) - // generate one order for fees - // the fee order has a rate of 1 ZRX / WETH with no taker fee and has 100 ZRX left to fill (completely fillable) - firstOrder = orderFactory.createSignedOrderFromPartial({ - makerAssetAmount: new BigNumber(400), - takerAssetAmount: new BigNumber(100), - takerFee: new BigNumber(200), - }); - firstRemainingFillAmount = new BigNumber(200); - secondOrder = orderFactory.createSignedOrderFromPartial({ - makerAssetAmount: new BigNumber(200), - takerAssetAmount: new BigNumber(100), - takerFee: new BigNumber(100), - }); - secondRemainingFillAmount = secondOrder.makerAssetAmount; - ordersAndFillableAmounts = { - orders: [firstOrder, secondOrder], - remainingFillableMakerAssetAmounts: [firstRemainingFillAmount, secondRemainingFillAmount], - }; - const smallFeeOrder = orderFactory.createSignedOrderFromPartial({ - makerAssetAmount: new BigNumber(100), - takerAssetAmount: new BigNumber(100), - }); - smallFeeOrderAndFillableAmount = { - orders: [smallFeeOrder], - remainingFillableMakerAssetAmounts: [smallFeeOrder.makerAssetAmount], - }; - const largeFeeOrder = orderFactory.createSignedOrderFromPartial({ - makerAssetAmount: new BigNumber(113), - takerAssetAmount: new BigNumber(200), - takerFee: new BigNumber(11), - }); - allFeeOrdersAndFillableAmounts = { - orders: [smallFeeOrder, largeFeeOrder], - remainingFillableMakerAssetAmounts: [ - smallFeeOrder.makerAssetAmount, - largeFeeOrder.makerAssetAmount.minus(largeFeeOrder.takerFee), - ], - }; - }); - describe('InsufficientLiquidityError', () => { - it('should throw if not enough maker asset liquidity (multiple orders)', () => { - // we have 400 makerAsset units available to fill but attempt to calculate a quote for 500 makerAsset units - const errorFunction = () => { - buyQuoteCalculator.calculate( - ordersAndFillableAmounts, - smallFeeOrderAndFillableAmount, - new BigNumber(500), - 0, - 0, - false, - ); - }; - testHelpers.expectInsufficientLiquidityError(expect, errorFunction, new BigNumber(400)); - }); - it('should throw if not enough maker asset liquidity (multiple orders with 20% slippage)', () => { - // we have 400 makerAsset units available to fill but attempt to calculate a quote for 500 makerAsset units - const errorFunction = () => { - buyQuoteCalculator.calculate( - ordersAndFillableAmounts, - smallFeeOrderAndFillableAmount, - new BigNumber(500), - 0, - 0.2, - false, - ); - }; - testHelpers.expectInsufficientLiquidityError(expect, errorFunction, new BigNumber(333)); - }); - it('should throw if not enough maker asset liquidity (multiple orders with 5% slippage)', () => { - // we have 400 makerAsset units available to fill but attempt to calculate a quote for 500 makerAsset units - const errorFunction = () => { - buyQuoteCalculator.calculate( - ordersAndFillableAmounts, - smallFeeOrderAndFillableAmount, - new BigNumber(600), - 0, - 0.05, - false, - ); - }; - testHelpers.expectInsufficientLiquidityError(expect, errorFunction, new BigNumber(380)); - }); - it('should throw if not enough maker asset liquidity (partially filled order)', () => { - const firstOrderAndFillableAmount: OrdersAndFillableAmounts = { - orders: [firstOrder], - remainingFillableMakerAssetAmounts: [firstRemainingFillAmount], - }; - - const errorFunction = () => { - buyQuoteCalculator.calculate( - firstOrderAndFillableAmount, - smallFeeOrderAndFillableAmount, - new BigNumber(201), - 0, - 0, - false, - ); - }; - testHelpers.expectInsufficientLiquidityError(expect, errorFunction, new BigNumber(200)); - }); - it('should throw if not enough maker asset liquidity (completely fillable order)', () => { - const completelyFillableOrder = orderFactory.createSignedOrderFromPartial({ - makerAssetAmount: new BigNumber(123), - takerAssetAmount: new BigNumber(100), - takerFee: new BigNumber(200), - }); - const completelyFillableOrdersAndFillableAmount: OrdersAndFillableAmounts = { - orders: [completelyFillableOrder], - remainingFillableMakerAssetAmounts: [completelyFillableOrder.makerAssetAmount], - }; - const errorFunction = () => { - buyQuoteCalculator.calculate( - completelyFillableOrdersAndFillableAmount, - smallFeeOrderAndFillableAmount, - new BigNumber(124), - 0, - 0, - false, - ); - }; - testHelpers.expectInsufficientLiquidityError(expect, errorFunction, new BigNumber(123)); - }); - it('should throw with 1 amount available if no slippage', () => { - const smallOrder = orderFactory.createSignedOrderFromPartial({ - makerAssetAmount: new BigNumber(1), - takerAssetAmount: new BigNumber(1), - takerFee: new BigNumber(0), - }); - const errorFunction = () => { - buyQuoteCalculator.calculate( - { orders: [smallOrder], remainingFillableMakerAssetAmounts: [smallOrder.makerAssetAmount] }, - smallFeeOrderAndFillableAmount, - new BigNumber(600), - 0, - 0, - false, - ); - }; - testHelpers.expectInsufficientLiquidityError(expect, errorFunction, new BigNumber(1)); - }); - it('should throw with 0 available to fill if amount rounds to 0', () => { - const smallOrder = orderFactory.createSignedOrderFromPartial({ - makerAssetAmount: new BigNumber(1), - takerAssetAmount: new BigNumber(1), - takerFee: new BigNumber(0), - }); - const errorFunction = () => { - buyQuoteCalculator.calculate( - { orders: [smallOrder], remainingFillableMakerAssetAmounts: [smallOrder.makerAssetAmount] }, - smallFeeOrderAndFillableAmount, - new BigNumber(600), - 0, - 0.2, - false, - ); - }; - testHelpers.expectInsufficientLiquidityError(expect, errorFunction, new BigNumber(0)); - }); - }); - it('should not throw if order is fillable', () => { - expect(() => - buyQuoteCalculator.calculate( - ordersAndFillableAmounts, - allFeeOrdersAndFillableAmounts, - new BigNumber(300), - 0, - 0, - false, - ), - ).to.not.throw(); - }); - it('should throw if not enough ZRX liquidity', () => { - // we request 300 makerAsset units but the ZRX order is only enough to fill the first order, which only has 200 makerAssetUnits available - expect(() => - buyQuoteCalculator.calculate( - ordersAndFillableAmounts, - smallFeeOrderAndFillableAmount, - new BigNumber(300), - 0, - 0, - false, - ), - ).to.throw(AssetBuyerError.InsufficientZrxLiquidity); - }); - it('calculates a correct buyQuote with no slippage', () => { - // we request 200 makerAsset units which can be filled using the first order - // the first order requires a fee of 100 ZRX from the taker which can be filled by the feeOrder - const assetBuyAmount = new BigNumber(200); - const feePercentage = 0.02; - const slippagePercentage = 0; - const buyQuote = buyQuoteCalculator.calculate( - ordersAndFillableAmounts, - smallFeeOrderAndFillableAmount, - assetBuyAmount, - feePercentage, - slippagePercentage, - false, - ); - // test if orders are correct - expect(buyQuote.orders).to.deep.equal([ordersAndFillableAmounts.orders[0]]); - expect(buyQuote.feeOrders).to.deep.equal([smallFeeOrderAndFillableAmount.orders[0]]); - // test if rates are correct - // 50 eth to fill the first order + 100 eth for fees - const expectedEthAmountForAsset = new BigNumber(50); - const expectedEthAmountForZrxFees = new BigNumber(100); - const expectedFillEthAmount = expectedEthAmountForAsset; - const expectedAffiliateFeeEthAmount = expectedEthAmountForAsset.multipliedBy(feePercentage); - const expectedFeeEthAmount = expectedAffiliateFeeEthAmount.plus(expectedEthAmountForZrxFees); - const expectedTotalEthAmount = expectedFillEthAmount.plus(expectedFeeEthAmount); - expect(buyQuote.bestCaseQuoteInfo.assetEthAmount).to.bignumber.equal(expectedFillEthAmount); - expect(buyQuote.bestCaseQuoteInfo.feeEthAmount).to.bignumber.equal(expectedFeeEthAmount); - expect(buyQuote.bestCaseQuoteInfo.totalEthAmount).to.bignumber.equal(expectedTotalEthAmount); - // because we have no slippage protection, minRate is equal to maxRate - expect(buyQuote.worstCaseQuoteInfo.assetEthAmount).to.bignumber.equal(expectedFillEthAmount); - expect(buyQuote.worstCaseQuoteInfo.feeEthAmount).to.bignumber.equal(expectedFeeEthAmount); - expect(buyQuote.worstCaseQuoteInfo.totalEthAmount).to.bignumber.equal(expectedTotalEthAmount); - // test if feePercentage gets passed through - expect(buyQuote.feePercentage).to.equal(feePercentage); - }); - it('calculates a correct buyQuote with with slippage', () => { - // we request 200 makerAsset units which can be filled using the first order - // however with 50% slippage we are protecting the buy with 100 extra makerAssetUnits - // so we need enough orders to fill 300 makerAssetUnits - // 300 makerAssetUnits can only be filled using both orders - // the first order requires a fee of 100 ZRX from the taker which can be filled by the feeOrder - const assetBuyAmount = new BigNumber(200); - const feePercentage = 0.02; - const slippagePercentage = 0.5; - const buyQuote = buyQuoteCalculator.calculate( - ordersAndFillableAmounts, - allFeeOrdersAndFillableAmounts, - assetBuyAmount, - feePercentage, - slippagePercentage, - false, - ); - // test if orders are correct - expect(buyQuote.orders).to.deep.equal(ordersAndFillableAmounts.orders); - expect(buyQuote.feeOrders).to.deep.equal(allFeeOrdersAndFillableAmounts.orders); - // test if rates are correct - // 50 eth to fill the first order + 100 eth for fees - const expectedEthAmountForAsset = new BigNumber(50); - const expectedEthAmountForZrxFees = new BigNumber(100); - const expectedFillEthAmount = expectedEthAmountForAsset; - const expectedAffiliateFeeEthAmount = expectedEthAmountForAsset.multipliedBy(feePercentage); - const expectedFeeEthAmount = expectedAffiliateFeeEthAmount.plus(expectedEthAmountForZrxFees); - const expectedTotalEthAmount = expectedFillEthAmount.plus(expectedFeeEthAmount); - expect(buyQuote.bestCaseQuoteInfo.assetEthAmount).to.bignumber.equal(expectedFillEthAmount); - expect(buyQuote.bestCaseQuoteInfo.feeEthAmount).to.bignumber.equal(expectedFeeEthAmount); - expect(buyQuote.bestCaseQuoteInfo.totalEthAmount).to.bignumber.equal(expectedTotalEthAmount); - // 100 eth to fill the first order + 208 eth for fees - const expectedWorstEthAmountForAsset = new BigNumber(100); - const expectedWorstEthAmountForZrxFees = new BigNumber(208); - const expectedWorstFillEthAmount = expectedWorstEthAmountForAsset; - const expectedWorstAffiliateFeeEthAmount = expectedWorstEthAmountForAsset.multipliedBy(feePercentage); - const expectedWorstFeeEthAmount = expectedWorstAffiliateFeeEthAmount.plus(expectedWorstEthAmountForZrxFees); - const expectedWorstTotalEthAmount = expectedWorstFillEthAmount.plus(expectedWorstFeeEthAmount); - expect(buyQuote.worstCaseQuoteInfo.assetEthAmount).to.bignumber.equal(expectedWorstFillEthAmount); - expect(buyQuote.worstCaseQuoteInfo.feeEthAmount).to.bignumber.equal(expectedWorstFeeEthAmount); - expect(buyQuote.worstCaseQuoteInfo.totalEthAmount).to.bignumber.equal(expectedWorstTotalEthAmount); - // test if feePercentage gets passed through - expect(buyQuote.feePercentage).to.equal(feePercentage); - }); - }); -}); diff --git a/packages/asset-buyer/test/utils/chai_setup.ts b/packages/asset-buyer/test/utils/chai_setup.ts deleted file mode 100644 index 1a8733093..000000000 --- a/packages/asset-buyer/test/utils/chai_setup.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as chai from 'chai'; -import chaiAsPromised = require('chai-as-promised'); -import ChaiBigNumber = require('chai-bignumber'); -import * as dirtyChai from 'dirty-chai'; - -export const chaiSetup = { - configure(): void { - chai.config.includeStack = true; - chai.use(ChaiBigNumber()); - chai.use(dirtyChai); - chai.use(chaiAsPromised); - }, -}; diff --git a/packages/asset-buyer/test/utils/mocks.ts b/packages/asset-buyer/test/utils/mocks.ts deleted file mode 100644 index d3e1c09c4..000000000 --- a/packages/asset-buyer/test/utils/mocks.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Web3ProviderEngine } from '@0x/subproviders'; -import * as TypeMoq from 'typemoq'; - -import { AssetBuyer } from '../../src/asset_buyer'; -import { OrderProvider, OrderProviderResponse, OrdersAndFillableAmounts } from '../../src/types'; - -// tslint:disable:promise-function-async - -// Implementing dummy class for using in mocks, see https://github.com/florinn/typemoq/issues/3 -class OrderProviderClass implements OrderProvider { - // tslint:disable-next-line:prefer-function-over-method - public async getOrdersAsync(): Promise { - return Promise.resolve({ orders: [] }); - } - // tslint:disable-next-line:prefer-function-over-method - public async getAvailableMakerAssetDatasAsync(takerAssetData: string): Promise { - return Promise.resolve([]); - } -} - -export const orderProviderMock = () => { - return TypeMoq.Mock.ofType(OrderProviderClass, TypeMoq.MockBehavior.Strict); -}; - -export const mockAvailableAssetDatas = ( - mockOrderProvider: TypeMoq.IMock, - assetData: string, - availableAssetDatas: string[], -) => { - mockOrderProvider - .setup(op => op.getAvailableMakerAssetDatasAsync(TypeMoq.It.isValue(assetData))) - .returns(() => { - return Promise.resolve(availableAssetDatas); - }) - .verifiable(TypeMoq.Times.once()); -}; - -const partiallyMockedAssetBuyer = ( - provider: Web3ProviderEngine, - orderProvider: OrderProvider, -): TypeMoq.IMock => { - const rawAssetBuyer = new AssetBuyer(provider, orderProvider); - const mockedAssetBuyer = TypeMoq.Mock.ofInstance(rawAssetBuyer, TypeMoq.MockBehavior.Loose, false); - mockedAssetBuyer.callBase = true; - return mockedAssetBuyer; -}; - -const mockGetOrdersAndAvailableAmounts = ( - mockedAssetBuyer: TypeMoq.IMock, - assetData: string, - ordersAndFillableAmounts: OrdersAndFillableAmounts, -): void => { - mockedAssetBuyer - .setup(a => a.getOrdersAndFillableAmountsAsync(assetData, false)) - .returns(() => Promise.resolve(ordersAndFillableAmounts)) - .verifiable(TypeMoq.Times.once()); -}; - -export const mockedAssetBuyerWithOrdersAndFillableAmounts = ( - provider: Web3ProviderEngine, - orderProvider: OrderProvider, - assetData: string, - ordersAndFillableAmounts: OrdersAndFillableAmounts, -): TypeMoq.IMock => { - const mockedAssetBuyer = partiallyMockedAssetBuyer(provider, orderProvider); - mockGetOrdersAndAvailableAmounts(mockedAssetBuyer, assetData, ordersAndFillableAmounts); - return mockedAssetBuyer; -}; diff --git a/packages/asset-buyer/test/utils/test_helpers.ts b/packages/asset-buyer/test/utils/test_helpers.ts deleted file mode 100644 index 04a58d2c8..000000000 --- a/packages/asset-buyer/test/utils/test_helpers.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { BigNumber } from '@0x/utils'; - -import { InsufficientAssetLiquidityError } from '../../src/errors'; - -export const testHelpers = { - expectInsufficientLiquidityError: ( - expect: Chai.ExpectStatic, - functionWhichTriggersError: () => void, - expectedAmountAvailableToFill: BigNumber, - ): void => { - let wasErrorThrown = false; - try { - functionWhichTriggersError(); - } catch (e) { - wasErrorThrown = true; - expect(e).to.be.instanceOf(InsufficientAssetLiquidityError); - if (expectedAmountAvailableToFill) { - expect(e.amountAvailableToFill).to.be.bignumber.equal(expectedAmountAvailableToFill); - } else { - expect(e.amountAvailableToFill).to.be.undefined(); - } - } - - expect(wasErrorThrown).to.be.true(); - }, -}; diff --git a/packages/asset-buyer/tsconfig.json b/packages/asset-buyer/tsconfig.json deleted file mode 100644 index 2ee711adc..000000000 --- a/packages/asset-buyer/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "lib", - "rootDir": "." - }, - "include": ["./src/**/*", "./test/**/*"] -} diff --git a/packages/asset-buyer/tslint.json b/packages/asset-buyer/tslint.json deleted file mode 100644 index dd9053357..000000000 --- a/packages/asset-buyer/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@0x/tslint-config"] -} diff --git a/packages/asset-buyer/typedoc-tsconfig.json b/packages/asset-buyer/typedoc-tsconfig.json deleted file mode 100644 index c9b0af1ae..000000000 --- a/packages/asset-buyer/typedoc-tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../typedoc-tsconfig", - "compilerOptions": { - "outDir": "lib" - }, - "include": ["./src/**/*", "./test/**/*"] -} diff --git a/packages/base-contract/.npmignore b/packages/base-contract/.npmignore deleted file mode 100644 index 24e65ad5b..000000000 --- a/packages/base-contract/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.* -yarn-error.log -/scripts/ -/src/ -tsconfig.json -/lib/monorepo_scripts/ diff --git a/packages/base-contract/CHANGELOG.json b/packages/base-contract/CHANGELOG.json deleted file mode 100644 index 63b1fe8f7..000000000 --- a/packages/base-contract/CHANGELOG.json +++ /dev/null @@ -1,370 +0,0 @@ -[ - { - "version": "4.0.0", - "changes": [ - { - "note": "Upgrade the bignumber.js to v8.0.2", - "pr": 1517 - } - ] - }, - { - "timestamp": 1547561734, - "version": "3.0.13", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1547225310, - "version": "3.0.12", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1547040760, - "version": "3.0.11", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "3.0.10", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544739608 - }, - { - "version": "3.0.9", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544570656 - }, - { - "timestamp": 1543401373, - "version": "3.0.8", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542821676, - "version": "3.0.7", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542208198, - "version": "3.0.6", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542134075, - "version": "3.0.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542028948, - "version": "3.0.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "3.0.3", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1541740904 - }, - { - "timestamp": 1539871071, - "version": "3.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "3.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1538693146 - }, - { - "version": "3.0.0", - "changes": [ - { - "note": "Change the way we detect BN to work with the newest ethers.js", - "pr": 1069 - }, - { - "note": "Add baseContract._throwIfRevertWithReasonCallResult", - "pr": 1069 - } - ], - "timestamp": 1538157789 - }, - { - "timestamp": 1537907159, - "version": "2.0.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537875740, - "version": "2.0.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537541580, - "version": "2.0.3", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1536142250, - "version": "2.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1535377027, - "version": "2.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1535133899, - "version": "2.0.0", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "2.0.0-rc.1", - "changes": [ - { - "pr": 915, - "note": "Added strict encoding/decoding checks for sendTransaction and call" - } - ], - "timestamp": 1534210131 - }, - { - "timestamp": 1532619515, - "version": "1.0.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532614997, - "version": "1.0.3", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532605697, - "version": "1.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532357734, - "version": "1.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532043000, - "version": "1.0.0", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1531919263, - "version": "0.3.6", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1531149657, - "version": "0.3.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "0.3.4", - "changes": [ - { - "note": "Update EthersJs to fix the `value.toLowerCase()` is not a function bug caused by `ethers.js` breaking patch version https://github.com/ethers-io/ethers.js/issues/201" - } - ], - "timestamp": 1529397769 - }, - { - "timestamp": 1527810075, - "version": "0.3.3", - "changes": [ - { - "note": "Incorrect publish that was unpublished" - } - ] - }, - { - "timestamp": 1527008270, - "version": "0.3.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1525477860, - "version": "0.3.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "0.3.0", - "changes": [ - { - "note": "Update ethers-contracts to ethers.js", - "pr": 540 - } - ], - "timestamp": 1525428773 - }, - { - "timestamp": 1524044013, - "version": "0.2.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "0.2.0", - "changes": [ - { - "note": "Contract wrappers now accept Provider and defaults instead of Web3Wrapper", - "pr": 501 - } - ], - "timestamp": 1523462196 - }, - { - "version": "0.1.0", - "changes": [ - { - "note": "Add tests for traversing ABI tree", - "pr": 485 - }, - { - "note": "Fix ABI tuples traversing", - "pr": 485 - }, - { - "note": "Fix ABI arrays traversing", - "pr": 485 - } - ], - "timestamp": 1522673609 - }, - { - "timestamp": 1522658513, - "version": "0.0.6", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "0.0.2", - "changes": [ - { - "note": "Initial release" - } - ], - "timestamp": 1520089200 - } -] diff --git a/packages/base-contract/CHANGELOG.md b/packages/base-contract/CHANGELOG.md deleted file mode 100644 index 975a56fd4..000000000 --- a/packages/base-contract/CHANGELOG.md +++ /dev/null @@ -1,161 +0,0 @@ - - -CHANGELOG - -## v3.0.13 - _January 15, 2019_ - - * Dependencies updated - -## v3.0.12 - _January 11, 2019_ - - * Dependencies updated - -## v3.0.11 - _January 9, 2019_ - - * Dependencies updated - -## v3.0.10 - _December 13, 2018_ - - * Dependencies updated - -## v3.0.9 - _December 11, 2018_ - - * Dependencies updated - -## v3.0.8 - _November 28, 2018_ - - * Dependencies updated - -## v3.0.7 - _November 21, 2018_ - - * Dependencies updated - -## v3.0.6 - _November 14, 2018_ - - * Dependencies updated - -## v3.0.5 - _November 13, 2018_ - - * Dependencies updated - -## v3.0.4 - _November 12, 2018_ - - * Dependencies updated - -## v3.0.3 - _November 9, 2018_ - - * Dependencies updated - -## v3.0.2 - _October 18, 2018_ - - * Dependencies updated - -## v3.0.1 - _October 4, 2018_ - - * Dependencies updated - -## v3.0.0 - _September 28, 2018_ - - * Change the way we detect BN to work with the newest ethers.js (#1069) - * Add baseContract._throwIfRevertWithReasonCallResult (#1069) - -## v2.0.5 - _September 25, 2018_ - - * Dependencies updated - -## v2.0.4 - _September 25, 2018_ - - * Dependencies updated - -## v2.0.3 - _September 21, 2018_ - - * Dependencies updated - -## v2.0.2 - _September 5, 2018_ - - * Dependencies updated - -## v2.0.1 - _August 27, 2018_ - - * Dependencies updated - -## v2.0.0 - _August 24, 2018_ - - * Dependencies updated - -## v2.0.0-rc.1 - _August 14, 2018_ - - * Added strict encoding/decoding checks for sendTransaction and call (#915) - -## v1.0.4 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.3 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.2 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.1 - _July 23, 2018_ - - * Dependencies updated - -## v1.0.0 - _July 19, 2018_ - - * Dependencies updated - -## v0.3.6 - _July 18, 2018_ - - * Dependencies updated - -## v0.3.5 - _July 9, 2018_ - - * Dependencies updated - -## v0.3.4 - _June 19, 2018_ - - * Update EthersJs to fix the `value.toLowerCase()` is not a function bug caused by `ethers.js` breaking patch version https://github.com/ethers-io/ethers.js/issues/201 - -## v0.3.3 - _May 31, 2018_ - - * Incorrect publish that was unpublished - -## v0.3.2 - _May 22, 2018_ - - * Dependencies updated - -## v0.3.1 - _May 4, 2018_ - - * Dependencies updated - -## v0.3.0 - _May 4, 2018_ - - * Update ethers-contracts to ethers.js (#540) - -## v0.2.1 - _April 18, 2018_ - - * Dependencies updated - -## v0.2.0 - _April 11, 2018_ - - * Contract wrappers now accept Provider and defaults instead of Web3Wrapper (#501) - -## v0.1.0 - _April 2, 2018_ - - * Add tests for traversing ABI tree (#485) - * Fix ABI tuples traversing (#485) - * Fix ABI arrays traversing (#485) - -## v0.0.6 - _April 2, 2018_ - - * Dependencies updated - -## v0.0.2 - _March 3, 2018_ - - * Initial release diff --git a/packages/base-contract/README.md b/packages/base-contract/README.md deleted file mode 100644 index b6ea05b74..000000000 --- a/packages/base-contract/README.md +++ /dev/null @@ -1,63 +0,0 @@ -## @0x/base-contract - -BaseContract to derive all auto-generated wrappers from - -## Installation - -```bash -yarn add @0x/base-contract -``` - -If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: - -```json -"compilerOptions": { - "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], -} -``` - -## Usage - -```javascript -import { BaseContract } from '@0x/base-contract'; -``` - -## Contributing - -We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. - -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. - -### Install Dependencies - -If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: - -```bash -yarn config set workspaces-experimental true -``` - -Then install dependencies - -```bash -yarn install -``` - -### Build - -To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: - -```bash -PKG=@0x/base-contract yarn build -``` - -Or continuously rebuild on change: - -```bash -PKG=@0x/base-contract yarn watch -``` - -### Lint - -```bash -yarn lint -``` diff --git a/packages/base-contract/coverage/.gitkeep b/packages/base-contract/coverage/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json deleted file mode 100644 index db09b16a1..000000000 --- a/packages/base-contract/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "@0x/base-contract", - "version": "3.0.13", - "engines": { - "node": ">=6.12" - }, - "description": "0x Base TS contract", - "main": "lib/src/index.js", - "types": "lib/src/index.d.ts", - "scripts": { - "build": "tsc -b", - "build:ci": "yarn build", - "clean": "shx rm -rf lib", - "test": "yarn run_mocha", - "rebuild_and_test": "run-s clean build test", - "test:circleci": "yarn test:coverage", - "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --bail --exit", - "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", - "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "lint": "tslint --format stylish --project ." - }, - "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo.git" - }, - "bugs": { - "url": "https://github.com/0xProject/0x-monorepo/issues" - }, - "homepage": "https://github.com/0xProject/0x-monorepo/packages/base-contract/README.md", - "devDependencies": { - "@0x/tslint-config": "^2.0.2", - "@types/lodash": "4.14.104", - "chai": "^4.0.1", - "make-promises-safe": "^1.1.0", - "mocha": "^4.1.0", - "npm-run-all": "^4.1.2", - "shx": "^0.2.2", - "tslint": "5.11.0", - "typescript": "3.0.1" - }, - "dependencies": { - "@0x/typescript-typings": "^3.0.8", - "@0x/utils": "^3.0.1", - "@0x/web3-wrapper": "^3.2.4", - "ethereum-types": "^1.1.6", - "ethers": "~4.0.4", - "lodash": "^4.17.5" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/base-contract/src/globals.d.ts b/packages/base-contract/src/globals.d.ts deleted file mode 100644 index 94e63a32d..000000000 --- a/packages/base-contract/src/globals.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module '*.json' { - const json: any; - /* tslint:disable */ - export default json; - /* tslint:enable */ -} diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts deleted file mode 100644 index 0238106f3..000000000 --- a/packages/base-contract/src/index.ts +++ /dev/null @@ -1,174 +0,0 @@ -import { AbiEncoder, abiUtils, BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import { - AbiDefinition, - AbiType, - ConstructorAbi, - ContractAbi, - DataItem, - MethodAbi, - Provider, - TxData, - TxDataPayable, -} from 'ethereum-types'; -import * as ethers from 'ethers'; -import * as _ from 'lodash'; - -import { formatABIDataItem } from './utils'; - -export interface AbiEncoderByFunctionSignature { - [key: string]: AbiEncoder.Method; -} - -const REVERT_ERROR_SELECTOR = '08c379a0'; -const REVERT_ERROR_SELECTOR_OFFSET = 2; -const REVERT_ERROR_SELECTOR_BYTES_LENGTH = 4; -const REVERT_ERROR_SELECTOR_END = REVERT_ERROR_SELECTOR_OFFSET + REVERT_ERROR_SELECTOR_BYTES_LENGTH * 2; - -export class BaseContract { - protected _abiEncoderByFunctionSignature: AbiEncoderByFunctionSignature; - protected _web3Wrapper: Web3Wrapper; - public abi: ContractAbi; - public address: string; - public contractName: string; - public constructorArgs: any[] = []; - protected static _formatABIDataItemList( - abis: DataItem[], - values: any[], - formatter: (type: string, value: any) => any, - ): any { - return _.map(values, (value: any, i: number) => formatABIDataItem(abis[i], value, formatter)); - } - protected static _lowercaseAddress(type: string, value: string): string { - return type === 'address' ? value.toLowerCase() : value; - } - protected static _bigNumberToString(_type: string, value: any): any { - return BigNumber.isBigNumber(value) ? value.toString() : value; - } - protected static _lookupConstructorAbi(abi: ContractAbi): ConstructorAbi { - const constructorAbiIfExists = _.find( - abi, - (abiDefinition: AbiDefinition) => abiDefinition.type === AbiType.Constructor, - // tslint:disable-next-line:no-unnecessary-type-assertion - ) as ConstructorAbi | undefined; - if (!_.isUndefined(constructorAbiIfExists)) { - return constructorAbiIfExists; - } else { - // If the constructor is not explicitly defined, it won't be included in the ABI. It is - // still callable however, so we construct what the ABI would look like were it to exist. - const defaultConstructorAbi: ConstructorAbi = { - type: AbiType.Constructor, - stateMutability: 'nonpayable', - payable: false, - inputs: [], - }; - return defaultConstructorAbi; - } - } - protected static async _applyDefaultsToTxDataAsync>( - txData: T, - txDefaults: Partial, - estimateGasAsync?: (txData: T) => Promise, - ): Promise { - // Gas amount sourced with the following priorities: - // 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.bind(_); - const txDataWithDefaults = { - ...removeUndefinedProperties(txDefaults), - ...removeUndefinedProperties(txData), - }; - if (_.isUndefined(txDataWithDefaults.gas) && !_.isUndefined(estimateGasAsync)) { - txDataWithDefaults.gas = await estimateGasAsync(txDataWithDefaults); - } - return txDataWithDefaults; - } - protected static _throwIfRevertWithReasonCallResult(rawCallResult: string): void { - if (rawCallResult.slice(REVERT_ERROR_SELECTOR_OFFSET, REVERT_ERROR_SELECTOR_END) === REVERT_ERROR_SELECTOR) { - const revertReasonArray = AbiEncoder.create('(string)').decodeAsArray( - ethers.utils.hexDataSlice(rawCallResult, REVERT_ERROR_SELECTOR_BYTES_LENGTH), - ); - if (revertReasonArray.length !== 1) { - throw new Error( - `Cannot safely decode revert reason: Expected an array with one element, got ${revertReasonArray}`, - ); - } - const revertReason = revertReasonArray[0]; - throw new Error(revertReason); - } - } - // Throws if the given arguments cannot be safely/correctly encoded based on - // the given inputAbi. An argument may not be considered safely encodeable - // if it overflows the corresponding Solidity type, there is a bug in the - // encoder, or the encoder performs unsafe type coercion. - public static strictArgumentEncodingCheck(inputAbi: DataItem[], args: any[]): string { - const abiEncoder = AbiEncoder.create(inputAbi); - const params = abiUtils.parseEthersParams(inputAbi); - const rawEncoded = abiEncoder.encode(args); - const rawDecoded = abiEncoder.decodeAsArray(rawEncoded); - for (let i = 0; i < rawDecoded.length; i++) { - const original = args[i]; - const decoded = rawDecoded[i]; - if (!abiUtils.isAbiDataEqual(params.names[i], params.types[i], original, decoded)) { - throw new Error( - `Cannot safely encode argument: ${params.names[i]} (${original}) of type ${ - params.types[i] - }. (Possible type overflow or other encoding error)`, - ); - } - } - return rawEncoded; - } - protected _lookupAbiEncoder(functionSignature: string): AbiEncoder.Method { - const abiEncoder = this._abiEncoderByFunctionSignature[functionSignature]; - if (_.isUndefined(abiEncoder)) { - throw new Error(`Failed to lookup method with function signature '${functionSignature}'`); - } - return abiEncoder; - } - protected _lookupAbi(functionSignature: string): MethodAbi { - const methodAbi = _.find(this.abi, (abiDefinition: AbiDefinition) => { - if (abiDefinition.type !== AbiType.Function) { - return false; - } - // tslint:disable-next-line:no-unnecessary-type-assertion - const abiFunctionSignature = new AbiEncoder.Method(abiDefinition as MethodAbi).getSignature(); - if (abiFunctionSignature === functionSignature) { - return true; - } - return false; - }) as MethodAbi; - return methodAbi; - } - protected _strictEncodeArguments(functionSignature: string, functionArguments: any): string { - const abiEncoder = this._lookupAbiEncoder(functionSignature); - const inputAbi = abiEncoder.getDataItem().components; - if (inputAbi === undefined) { - throw new Error(`Undefined Method Input ABI`); - } - const abiEncodedArguments = abiEncoder.encode(functionArguments); - return abiEncodedArguments; - } - constructor( - contractName: string, - abi: ContractAbi, - address: string, - provider: Provider, - txDefaults?: Partial, - ) { - this.contractName = contractName; - this._web3Wrapper = new Web3Wrapper(provider, txDefaults); - this.abi = abi; - this.address = address; - const methodAbis = this.abi.filter( - (abiDefinition: AbiDefinition) => abiDefinition.type === AbiType.Function, - ) as MethodAbi[]; - this._abiEncoderByFunctionSignature = {}; - _.each(methodAbis, methodAbi => { - const abiEncoder = new AbiEncoder.Method(methodAbi); - const functionSignature = abiEncoder.getSignature(); - this._abiEncoderByFunctionSignature[functionSignature] = abiEncoder; - }); - } -} diff --git a/packages/base-contract/src/utils.ts b/packages/base-contract/src/utils.ts deleted file mode 100644 index 61f176df5..000000000 --- a/packages/base-contract/src/utils.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { DataItem } from 'ethereum-types'; -import * as _ from 'lodash'; - -// tslint:disable-next-line:completed-docs -export function formatABIDataItem(abi: DataItem, value: any, formatter: (type: string, value: any) => any): any { - const trailingArrayRegex = /\[\d*\]$/; - if (abi.type.match(trailingArrayRegex)) { - const arrayItemType = abi.type.replace(trailingArrayRegex, ''); - return _.map(value, val => { - const arrayItemAbi = { - ...abi, - type: arrayItemType, - }; - return formatABIDataItem(arrayItemAbi, val, formatter); - }); - } else if (abi.type === 'tuple') { - const formattedTuple: { [componentName: string]: DataItem } = {}; - _.forEach(abi.components, componentABI => { - formattedTuple[componentABI.name] = formatABIDataItem(componentABI, value[componentABI.name], formatter); - }); - return formattedTuple; - } else { - return formatter(abi.type, value); - } -} diff --git a/packages/base-contract/test/base_contract_test.ts b/packages/base-contract/test/base_contract_test.ts deleted file mode 100644 index 2c31d1f11..000000000 --- a/packages/base-contract/test/base_contract_test.ts +++ /dev/null @@ -1,114 +0,0 @@ -import * as chai from 'chai'; -import 'mocha'; - -import { BaseContract } from '../src'; - -const { expect } = chai; - -describe('BaseContract', () => { - describe('strictArgumentEncodingCheck', () => { - it('works for simple types', () => { - BaseContract.strictArgumentEncodingCheck( - [{ name: 'to', type: 'address' }], - ['0xe834ec434daba538cd1b9fe1582052b880bd7e63'], - ); - }); - it('works for array types', () => { - const inputAbi = [ - { - name: 'takerAssetFillAmounts', - type: 'uint256[]', - }, - ]; - const args = [ - ['9000000000000000000', '79000000000000000000', '979000000000000000000', '7979000000000000000000'], - ]; - BaseContract.strictArgumentEncodingCheck(inputAbi, args); - }); - it('works for tuple/struct types', () => { - const inputAbi = [ - { - components: [ - { - name: 'makerAddress', - type: 'address', - }, - { - name: 'takerAddress', - type: 'address', - }, - { - name: 'feeRecipientAddress', - type: 'address', - }, - { - name: 'senderAddress', - type: 'address', - }, - { - name: 'makerAssetAmount', - type: 'uint256', - }, - { - name: 'takerAssetAmount', - type: 'uint256', - }, - { - name: 'makerFee', - type: 'uint256', - }, - { - name: 'takerFee', - type: 'uint256', - }, - { - name: 'expirationTimeSeconds', - type: 'uint256', - }, - { - name: 'salt', - type: 'uint256', - }, - { - name: 'makerAssetData', - type: 'bytes', - }, - { - name: 'takerAssetData', - type: 'bytes', - }, - ], - name: 'order', - type: 'tuple', - }, - ]; - const args = [ - { - makerAddress: '0x6ecbe1db9ef729cbe972c83fb886247691fb6beb', - takerAddress: '0x0000000000000000000000000000000000000000', - feeRecipientAddress: '0xe834ec434daba538cd1b9fe1582052b880bd7e63', - senderAddress: '0x0000000000000000000000000000000000000000', - makerAssetAmount: '0', - takerAssetAmount: '200000000000000000000', - makerFee: '1000000000000000000', - takerFee: '1000000000000000000', - expirationTimeSeconds: '1532563026', - salt: '59342956082154660870994022243365949771115859664887449740907298019908621891376', - makerAssetData: '0xf47261b00000000000000000000000001dc4c1cefef38a777b15aa20260a54e584b16c48', - takerAssetData: '0xf47261b00000000000000000000000001d7022f5b17d2f8b695918fb48fa1089c9f85401', - }, - ]; - BaseContract.strictArgumentEncodingCheck(inputAbi, args); - }); - it('throws for integer overflows', () => { - expect(() => - BaseContract.strictArgumentEncodingCheck([{ name: 'amount', type: 'uint8' }], ['256']), - ).to.throw(); - }); - it('throws for fixed byte array overflows', () => { - expect(() => - BaseContract.strictArgumentEncodingCheck([{ name: 'hash', type: 'bytes8' }], ['0x001122334455667788']), - ).to.throw(); - }); - }); -}); diff --git a/packages/base-contract/test/utils_test.ts b/packages/base-contract/test/utils_test.ts deleted file mode 100644 index 0608b72a2..000000000 --- a/packages/base-contract/test/utils_test.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { BigNumber } from '@0x/utils'; -import * as chai from 'chai'; -import 'mocha'; - -import { formatABIDataItem } from '../src/utils'; - -const { expect } = chai; - -describe('Utils tests', () => { - describe('#formatABIDataItem', () => { - it('correctly handles arrays', () => { - const calls: Array<{ type: string; value: any }> = []; - const abi = { - name: 'values', - type: 'uint256[]', - }; - const val = [1, 2, 3]; - const formatted = formatABIDataItem(abi, val, (type: string, value: any) => { - calls.push({ type, value }); - return value; // no-op - }); - expect(formatted).to.be.deep.equal(val); - expect(calls).to.be.deep.equal([ - { type: 'uint256', value: 1 }, - { type: 'uint256', value: 2 }, - { type: 'uint256', value: 3 }, - ]); - }); - it('correctly handles tuples', () => { - const calls: Array<{ type: string; value: any }> = []; - const abi = { - components: [ - { - name: 'to', - type: 'address', - }, - { - name: 'amount', - type: 'uint256', - }, - ], - name: 'data', - type: 'tuple', - }; - const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'; - const val = { to: ZERO_ADDRESS, amount: new BigNumber(1) }; - const formatted = formatABIDataItem(abi, val, (type: string, value: any) => { - calls.push({ type, value }); - return value; // no-op - }); - expect(formatted).to.be.deep.equal(val); - expect(calls).to.be.deep.equal([ - { - type: 'address', - value: val.to, - }, - { - type: 'uint256', - value: val.amount, - }, - ]); - }); - it('correctly handles nested arrays of tuples', () => { - const calls: Array<{ type: string; value: any }> = []; - const abi = { - components: [ - { - name: 'to', - type: 'address', - }, - { - name: 'amount', - type: 'uint256', - }, - ], - name: 'data', - type: 'tuple[2][]', - }; - const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'; - const val = [ - [{ to: ZERO_ADDRESS, amount: new BigNumber(1) }, { to: ZERO_ADDRESS, amount: new BigNumber(2) }], - ]; - const formatted = formatABIDataItem(abi, val, (type: string, value: any) => { - calls.push({ type, value }); - return value; // no-op - }); - expect(formatted).to.be.deep.equal(val); - expect(calls).to.be.deep.equal([ - { - type: 'address', - value: val[0][0].to, - }, - { - type: 'uint256', - value: val[0][0].amount, - }, - { - type: 'address', - value: val[0][1].to, - }, - { - type: 'uint256', - value: val[0][1].amount, - }, - ]); - }); - }); -}); diff --git a/packages/base-contract/tsconfig.json b/packages/base-contract/tsconfig.json deleted file mode 100644 index 718e623c7..000000000 --- a/packages/base-contract/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "lib", - "rootDir": "." - }, - "include": ["src/**/*", "test/**/*"] -} diff --git a/packages/base-contract/tslint.json b/packages/base-contract/tslint.json deleted file mode 100644 index dd9053357..000000000 --- a/packages/base-contract/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@0x/tslint-config"] -} diff --git a/packages/connect/.npmignore b/packages/connect/.npmignore deleted file mode 100644 index 9db6e838d..000000000 --- a/packages/connect/.npmignore +++ /dev/null @@ -1,8 +0,0 @@ -.* -yarn-error.log -/src/ -/scripts/ -/generated_docs/ -test/ -tsconfig.json -/lib/src/monorepo_scripts/ diff --git a/packages/connect/CHANGELOG.json b/packages/connect/CHANGELOG.json deleted file mode 100644 index c2f16d96a..000000000 --- a/packages/connect/CHANGELOG.json +++ /dev/null @@ -1,471 +0,0 @@ -[ - { - "version": "4.0.0", - "changes": [ - { - "note": "Upgrade the bignumber.js to v8.0.2", - "pr": 1517 - } - ] - }, - { - "timestamp": 1547561734, - "version": "3.0.13", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1547225310, - "version": "3.0.12", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1547040760, - "version": "3.0.11", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "3.0.10", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544739608 - }, - { - "version": "3.0.9", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544570656 - }, - { - "timestamp": 1543401373, - "version": "3.0.8", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542821676, - "version": "3.0.7", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542208198, - "version": "3.0.6", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542134075, - "version": "3.0.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542028948, - "version": "3.0.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "3.0.3", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1541740904 - }, - { - "timestamp": 1539871071, - "version": "3.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "3.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1538693146 - }, - { - "version": "3.0.0", - "changes": [ - { - "note": "Change /order_config request to a POST instead of GET", - "pr": 1091 - } - ], - "timestamp": 1538157789 - }, - { - "timestamp": 1537907159, - "version": "2.0.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "2.0.3", - "changes": [ - { - "note": "Import SRA-related types from @0xproject/types", - "pr": 1085 - } - ], - "timestamp": 1537875740 - }, - { - "timestamp": 1537541580, - "version": "2.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537369748, - "version": "2.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "2.0.0", - "changes": [ - { - "note": "Change `OrderConfigRequest` to use BigNumber instead of string for relevant fields.", - "pr": 1058 - } - ], - "timestamp": 1536142250 - }, - { - "version": "2.0.0-rc.2", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1535377027 - }, - { - "version": "2.0.0-rc.1", - "changes": [ - { - "note": "Updated for SRA v2", - "pr": 974 - }, - { - "note": "Stopped exporting `Order` type", - "pr": 924 - } - ], - "timestamp": 1535133899 - }, - { - "timestamp": 1534210131, - "version": "1.0.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532619515, - "version": "1.0.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532614997, - "version": "1.0.3", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532605697, - "version": "1.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532357734, - "version": "1.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532043000, - "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": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1529397769, - "version": "0.6.15", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1527616612, - "version": "0.6.14", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1527008270, - "version": "0.6.13", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1525477860, - "version": "0.6.12", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1525428773, - "version": "0.6.11", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1524044013, - "version": "0.6.10", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1523462196, - "version": "0.6.9", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1522673609, - "version": "0.6.8", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1522658513, - "version": "0.6.7", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "0.6.4", - "changes": [ - { - "note": "Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package", - "pr": 456 - } - ], - "timestamp": 1521298800 - }, - { - "version": "0.6.2", - "changes": [ - { - "note": "Fix JSON parse empty response", - "pr": 407 - } - ], - "timestamp": 1518706800 - }, - { - "version": "0.6.0", - "changes": [ - { - "note": "Add pagination options to HttpClient methods", - "pr": 393 - }, - { - "note": "Add heartbeat configuration to WebSocketOrderbookChannel constructor", - "pr": 406 - } - ], - "timestamp": 1518706800 - }, - { - "version": "0.5.7", - "changes": [ - { - "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": 389 - } - ], - "timestamp": 1518102000 - }, - { - "version": "0.5.0", - "changes": [ - { - "note": "Sanitize api endpoint url and remove trailing slashes", - "pr": 318 - }, - { - "note": "Improve error message text in HttpClient", - "pr": 318 - }, - { - "note": "Stop appending '/v0' to api endpoint url in HttpClient", - "pr": 318 - } - ], - "timestamp": 1516114800 - }, - { - "version": "0.4.0", - "changes": [ - { - "note": "Prevent getFeesAsync method on HttpClient from mutating input", - "pr": 296 - } - ], - "timestamp": 1515596400 - }, - { - "version": "0.3.0", - "changes": [ - { - "note": "Expose WebSocketOrderbookChannel and associated types to public interface", - "pr": 251 - }, - { - "note": "Remove tokenA and tokenB fields from OrdersRequest", - "pr": 256 - } - ], - "timestamp": 1512658800 - }, - { - "version": "0.2.0", - "changes": [ - { - "note": "Add SignedOrder and TokenTradeInfo to the public interface" - }, - { - "note": "Add ECSignature and Order to the public interface" - }, - { - "note": "Remove dependency on 0x.js" - } - ], - "timestamp": 1511881200 - }, - { - "version": "0.1.0", - "changes": [ - { - "note": "Provide a HttpClient class for interacting with standard relayer api compliant HTTP urls" - } - ], - "timestamp": 1511276400 - } -] diff --git a/packages/connect/CHANGELOG.md b/packages/connect/CHANGELOG.md deleted file mode 100644 index 7556aae72..000000000 --- a/packages/connect/CHANGELOG.md +++ /dev/null @@ -1,201 +0,0 @@ - - -CHANGELOG - -## v3.0.13 - _January 15, 2019_ - - * Dependencies updated - -## v3.0.12 - _January 11, 2019_ - - * Dependencies updated - -## v3.0.11 - _January 9, 2019_ - - * Dependencies updated - -## v3.0.10 - _December 13, 2018_ - - * Dependencies updated - -## v3.0.9 - _December 11, 2018_ - - * Dependencies updated - -## v3.0.8 - _November 28, 2018_ - - * Dependencies updated - -## v3.0.7 - _November 21, 2018_ - - * Dependencies updated - -## v3.0.6 - _November 14, 2018_ - - * Dependencies updated - -## v3.0.5 - _November 13, 2018_ - - * Dependencies updated - -## v3.0.4 - _November 12, 2018_ - - * Dependencies updated - -## v3.0.3 - _November 9, 2018_ - - * Dependencies updated - -## v3.0.2 - _October 18, 2018_ - - * Dependencies updated - -## v3.0.1 - _October 4, 2018_ - - * Dependencies updated - -## v3.0.0 - _September 28, 2018_ - - * Change /order_config request to a POST instead of GET (#1091) - -## v2.0.4 - _September 25, 2018_ - - * Dependencies updated - -## v2.0.3 - _September 25, 2018_ - - * Import SRA-related types from @0xproject/types (#1085) - -## v2.0.2 - _September 21, 2018_ - - * Dependencies updated - -## v2.0.1 - _September 19, 2018_ - - * Dependencies updated - -## v2.0.0 - _September 5, 2018_ - - * Change `OrderConfigRequest` to use BigNumber instead of string for relevant fields. (#1058) - -## v2.0.0-rc.2 - _August 27, 2018_ - - * Dependencies updated - -## v2.0.0-rc.1 - _August 24, 2018_ - - * Updated for SRA v2 (#974) - * Stopped exporting `Order` type (#924) - -## v1.0.5 - _August 14, 2018_ - - * Dependencies updated - -## v1.0.4 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.3 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.2 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.1 - _July 23, 2018_ - - * Dependencies updated - -## v1.0.0 - _July 19, 2018_ - - * Remove `WebSocketOrderbookChannel` from the public interface and replace with `orderbookChannelFactory` - -## v0.6.17 - _July 18, 2018_ - - * Dependencies updated - -## v0.6.16 - _July 9, 2018_ - - * Dependencies updated - -## v0.6.15 - _June 19, 2018_ - - * Dependencies updated - -## v0.6.14 - _May 29, 2018_ - - * Dependencies updated - -## v0.6.13 - _May 22, 2018_ - - * Dependencies updated - -## v0.6.12 - _May 4, 2018_ - - * Dependencies updated - -## v0.6.11 - _May 4, 2018_ - - * Dependencies updated - -## v0.6.10 - _April 18, 2018_ - - * Dependencies updated - -## v0.6.9 - _April 11, 2018_ - - * Dependencies updated - -## v0.6.8 - _April 2, 2018_ - - * Dependencies updated - -## v0.6.7 - _April 2, 2018_ - - * Dependencies updated - -## v0.6.4 - _March 17, 2018_ - - * Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package (#456) - -## v0.6.2 - _February 15, 2018_ - - * Fix JSON parse empty response (#407) - -## v0.6.0 - _February 15, 2018_ - - * Add pagination options to HttpClient methods (#393) - * Add heartbeat configuration to WebSocketOrderbookChannel constructor (#406) - -## v0.5.7 - _February 8, 2018_ - - * Fix publishing issue where .npmignore was not properly excluding undesired content (#389) - -## v0.5.0 - _January 16, 2018_ - - * Sanitize api endpoint url and remove trailing slashes (#318) - * Improve error message text in HttpClient (#318) - * Stop appending '/v0' to api endpoint url in HttpClient (#318) - -## v0.4.0 - _January 10, 2018_ - - * Prevent getFeesAsync method on HttpClient from mutating input (#296) - -## v0.3.0 - _December 7, 2017_ - - * Expose WebSocketOrderbookChannel and associated types to public interface (#251) - * Remove tokenA and tokenB fields from OrdersRequest (#256) - -## v0.2.0 - _November 28, 2017_ - - * Add SignedOrder and TokenTradeInfo to the public interface - * Add ECSignature and Order to the public interface - * Remove dependency on 0x.js - -## v0.1.0 - _November 21, 2017_ - - * Provide a HttpClient class for interacting with standard relayer api compliant HTTP urls diff --git a/packages/connect/README.md b/packages/connect/README.md deleted file mode 100644 index 386b7bbbf..000000000 --- a/packages/connect/README.md +++ /dev/null @@ -1,74 +0,0 @@ -## @0x/connect - -This repository contains a Javascript library that makes it easy to interact with Relayers that conform to the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api) - -## Installation - -```bash -yarn add @0x/connect -``` - -If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: - -```json -"compilerOptions": { - "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], -} -``` - -## Usage - -- [Docs](https://0xproject.com/docs/connect) -- [Tutorials](https://0xproject.com/wiki#connect) - -## Contributing - -We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. - -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. - -### Install dependencies - -If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: - -```bash -yarn config set workspaces-experimental true -``` - -Then install dependencies - -```bash -yarn install -``` - -### Build - -To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: - -```bash -PKG=@0x/connect yarn build -``` - -Or continuously rebuild on change: - -```bash -PKG=@0x/connect yarn watch -``` - -### Clean - -```bash -yarn clean -``` - -### Lint - -```bash -yarn lint -``` - -### Run Tests - -```bash -yarn test -``` diff --git a/packages/connect/coverage/.gitkeep b/packages/connect/coverage/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/connect/package.json b/packages/connect/package.json deleted file mode 100644 index 15a4c12f1..000000000 --- a/packages/connect/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "@0x/connect", - "version": "3.0.13", - "engines": { - "node": ">=6.12" - }, - "description": "A javascript library for interacting with the standard relayer api", - "keywords": [ - "connect", - "0xproject", - "ethereum", - "tokens", - "exchange" - ], - "main": "lib/src/index.js", - "types": "lib/src/index.d.ts", - "scripts": { - "build": "tsc -b", - "build:ci": "yarn build", - "clean": "shx rm -rf lib test_temp generated_docs", - "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", - "lint": "tslint --format stylish --project .", - "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", - "test": "run-s copy_test_fixtures run_mocha", - "rebuild_and_test": "run-s clean build test", - "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", - "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "test:circleci": "yarn test:coverage", - "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES" - }, - "config": { - "postpublish": { - "assets": [] - } - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo.git" - }, - "author": "Brandon Millman", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x-monorepo/issues" - }, - "homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md", - "dependencies": { - "@0x/assert": "^1.0.23", - "@0x/json-schemas": "^2.1.7", - "@0x/order-utils": "^3.1.2", - "@0x/types": "^1.5.2", - "@0x/typescript-typings": "^3.0.8", - "@0x/utils": "^3.0.1", - "lodash": "^4.17.5", - "query-string": "^5.0.1", - "sinon": "^4.0.0", - "uuid": "^3.3.2", - "websocket": "^1.0.25" - }, - "devDependencies": { - "@0x/tslint-config": "^2.0.2", - "@types/fetch-mock": "^6.0.3", - "@types/lodash": "4.14.104", - "@types/mocha": "^2.2.42", - "@types/query-string": "^5.0.1", - "@types/sinon": "^2.2.2", - "@types/uuid": "^3.4.3", - "@types/websocket": "^0.0.39", - "async-child-process": "^1.1.1", - "chai": "^4.0.1", - "chai-as-promised": "^7.1.0", - "copyfiles": "^2.0.0", - "dirty-chai": "^2.0.1", - "fetch-mock": "^5.13.1", - "make-promises-safe": "^1.1.0", - "mocha": "^4.1.0", - "npm-run-all": "^4.1.2", - "nyc": "^11.0.1", - "shx": "^0.2.2", - "tslint": "5.11.0", - "typedoc": "0.13.0", - "typescript": "3.0.1" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/connect/src/globals.d.ts b/packages/connect/src/globals.d.ts deleted file mode 100644 index 783b92913..000000000 --- a/packages/connect/src/globals.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.json' { - const value: any; - export default value; -} diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts deleted file mode 100644 index c52425431..000000000 --- a/packages/connect/src/http_client.ts +++ /dev/null @@ -1,210 +0,0 @@ -import { assert } from '@0x/assert'; -import { schemas } from '@0x/json-schemas'; -import { - APIOrder, - AssetPairsRequestOpts, - AssetPairsResponse, - FeeRecipientsResponse, - OrderbookRequest, - OrderbookResponse, - OrderConfigRequest, - OrderConfigResponse, - OrdersRequestOpts, - OrdersResponse, - PagedRequestOpts, - RequestOpts, - SignedOrder, -} from '@0x/types'; -import { fetchAsync } from '@0x/utils'; -import * as _ from 'lodash'; -import * as queryString from 'query-string'; - -import { Client, HttpRequestOptions, HttpRequestType } from './types'; -import { relayerResponseJsonParsers } from './utils/relayer_response_json_parsers'; - -const TRAILING_SLASHES_REGEX = /\/+$/; - -/** - * This class includes all the functionality related to interacting with a set of HTTP endpoints - * that implement the standard relayer API v2 - */ -export class HttpClient implements Client { - private readonly _apiEndpointUrl: string; - /** - * Format parameters to be appended to http requests into query string form - */ - private static _buildQueryStringFromHttpParams(params?: object): string { - // if params are undefined or empty, return an empty string - if (_.isUndefined(params) || _.isEmpty(params)) { - return ''; - } - // stringify the formatted object - const stringifiedParams = queryString.stringify(params); - return `?${stringifiedParams}`; - } - /** - * Instantiates a new HttpClient instance - * @param url The relayer API base HTTP url you would like to interact with - * @return An instance of HttpClient - */ - constructor(url: string) { - assert.isWebUri('url', url); - this._apiEndpointUrl = url.replace(TRAILING_SLASHES_REGEX, ''); // remove trailing slashes - } - /** - * Retrieve assetData pair info from the API - * @param requestOpts Options specifying assetData information to retrieve, page information, and network id. - * @return The resulting AssetPairsResponse that match the request - */ - public async getAssetPairsAsync( - requestOpts?: RequestOpts & AssetPairsRequestOpts & PagedRequestOpts, - ): Promise { - if (!_.isUndefined(requestOpts)) { - assert.doesConformToSchema('requestOpts', requestOpts, schemas.assetPairsRequestOptsSchema); - assert.doesConformToSchema('requestOpts', requestOpts, schemas.pagedRequestOptsSchema); - assert.doesConformToSchema('requestOpts', requestOpts, schemas.requestOptsSchema); - } - const httpRequestOpts = { - params: requestOpts, - }; - const responseJson = await this._requestAsync('/asset_pairs', HttpRequestType.Get, httpRequestOpts); - const assetDataPairs = relayerResponseJsonParsers.parseAssetDataPairsJson(responseJson); - return assetDataPairs; - } - /** - * Retrieve orders from the API - * @param requestOpts Options specifying orders to retrieve and page information, page information, and network id. - * @return The resulting OrdersResponse that match the request - */ - public async getOrdersAsync( - requestOpts?: RequestOpts & OrdersRequestOpts & PagedRequestOpts, - ): Promise { - if (!_.isUndefined(requestOpts)) { - assert.doesConformToSchema('requestOpts', requestOpts, schemas.ordersRequestOptsSchema); - assert.doesConformToSchema('requestOpts', requestOpts, schemas.pagedRequestOptsSchema); - assert.doesConformToSchema('requestOpts', requestOpts, schemas.requestOptsSchema); - } - const httpRequestOpts = { - params: requestOpts, - }; - const responseJson = await this._requestAsync(`/orders`, HttpRequestType.Get, httpRequestOpts); - const orders = relayerResponseJsonParsers.parseOrdersJson(responseJson); - return orders; - } - /** - * Retrieve a specific order from the API - * @param orderHash An orderHash generated from the desired order - * @return The APIOrder that matches the supplied orderHash - */ - public async getOrderAsync(orderHash: string, requestOpts?: RequestOpts): Promise { - if (!_.isUndefined(requestOpts)) { - assert.doesConformToSchema('requestOpts', requestOpts, schemas.requestOptsSchema); - } - assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema); - const httpRequestOpts = { - params: requestOpts, - }; - const responseJson = await this._requestAsync(`/order/${orderHash}`, HttpRequestType.Get, httpRequestOpts); - const order = relayerResponseJsonParsers.parseAPIOrderJson(responseJson); - return order; - } - /** - * Retrieve an orderbook from the API - * @param request An OrderbookRequest instance describing the specific orderbook to retrieve - * @param requestOpts Options specifying page information, and network id. - * @return The resulting OrderbookResponse that matches the request - */ - public async getOrderbookAsync( - request: OrderbookRequest, - requestOpts?: RequestOpts & PagedRequestOpts, - ): Promise { - assert.doesConformToSchema('request', request, schemas.orderBookRequestSchema); - if (!_.isUndefined(requestOpts)) { - assert.doesConformToSchema('requestOpts', requestOpts, schemas.pagedRequestOptsSchema); - assert.doesConformToSchema('requestOpts', requestOpts, schemas.requestOptsSchema); - } - const httpRequestOpts = { - params: _.defaults({}, request, requestOpts), - }; - const responseJson = await this._requestAsync('/orderbook', HttpRequestType.Get, httpRequestOpts); - const orderbook = relayerResponseJsonParsers.parseOrderbookResponseJson(responseJson); - return orderbook; - } - /** - * Retrieve fee information from the API - * @param request A OrderConfigRequest instance describing the specific fees to retrieve - * @param requestOpts Options specifying network id. - * @return The resulting OrderConfigResponse that matches the request - */ - public async getOrderConfigAsync( - request: OrderConfigRequest, - requestOpts?: RequestOpts, - ): Promise { - if (!_.isUndefined(requestOpts)) { - assert.doesConformToSchema('requestOpts', requestOpts, schemas.requestOptsSchema); - } - assert.doesConformToSchema('request', request, schemas.orderConfigRequestSchema); - const httpRequestOpts = { - params: requestOpts, - payload: request, - }; - const responseJson = await this._requestAsync('/order_config', HttpRequestType.Post, httpRequestOpts); - const fees = relayerResponseJsonParsers.parseOrderConfigResponseJson(responseJson); - return fees; - } - /** - * Retrieve the list of fee recipient addresses used by the relayer. - * @param requestOpts Options specifying page information, and network id. - * @return The resulting FeeRecipientsResponse - */ - public async getFeeRecipientsAsync(requestOpts?: RequestOpts & PagedRequestOpts): Promise { - if (!_.isUndefined(requestOpts)) { - assert.doesConformToSchema('requestOpts', requestOpts, schemas.pagedRequestOptsSchema); - assert.doesConformToSchema('requestOpts', requestOpts, schemas.requestOptsSchema); - } - const httpRequestOpts = { - params: requestOpts, - }; - const feeRecipients = await this._requestAsync('/fee_recipients', HttpRequestType.Get, httpRequestOpts); - assert.doesConformToSchema('feeRecipients', feeRecipients, schemas.relayerApiFeeRecipientsResponseSchema); - return feeRecipients; - } - /** - * Submit a signed order to the API - * @param signedOrder A SignedOrder instance to submit - * @param requestOpts Options specifying network id. - */ - public async submitOrderAsync(signedOrder: SignedOrder, requestOpts?: RequestOpts): Promise { - assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema); - const httpRequestOpts = { - params: requestOpts, - payload: signedOrder, - }; - await this._requestAsync('/order', HttpRequestType.Post, httpRequestOpts); - } - private async _requestAsync( - path: string, - requestType: HttpRequestType, - requestOptions?: HttpRequestOptions, - ): Promise { - const params = _.get(requestOptions, 'params'); - const payload = _.get(requestOptions, 'payload'); - const query = HttpClient._buildQueryStringFromHttpParams(params); - const url = `${this._apiEndpointUrl}${path}${query}`; - const headers = new Headers({ - 'content-type': 'application/json', - }); - const response = await fetchAsync(url, { - method: requestType, - body: JSON.stringify(payload), - headers, - }); - const text = await response.text(); - if (!response.ok) { - const errorString = `${response.status} - ${response.statusText}\n${requestType} ${url}\n${text}`; - throw Error(errorString); - } - const result = !_.isEmpty(text) ? JSON.parse(text) : undefined; - return result; - } -} diff --git a/packages/connect/src/index.ts b/packages/connect/src/index.ts deleted file mode 100644 index f319d63cb..000000000 --- a/packages/connect/src/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -export { HttpClient } from './http_client'; -export { ordersChannelFactory } from './orders_channel_factory'; -export { Client, OrdersChannel, OrdersChannelHandler } from './types'; -export { - APIOrder, - AssetPairsRequestOpts, - AssetPairsResponse, - FeeRecipientsResponse, - OrderbookRequest, - OrderbookResponse, - OrderConfigRequest, - OrderConfigResponse, - OrdersChannelSubscriptionOpts, - OrdersRequestOpts, - OrdersResponse, - PagedRequestOpts, - PaginatedCollection, - RequestOpts, - SignedOrder, -} from '@0x/types'; diff --git a/packages/connect/src/orders_channel_factory.ts b/packages/connect/src/orders_channel_factory.ts deleted file mode 100644 index 5986d2a77..000000000 --- a/packages/connect/src/orders_channel_factory.ts +++ /dev/null @@ -1,29 +0,0 @@ -import * as WebSocket from 'websocket'; - -import { OrdersChannel, OrdersChannelHandler } from './types'; -import { assert } from './utils/assert'; -import { WebSocketOrdersChannel } from './ws_orders_channel'; - -export const ordersChannelFactory = { - /** - * Instantiates a new WebSocketOrdersChannel instance - * @param url The relayer API base WS url you would like to interact with - * @param handler An OrdersChannelHandler instance that responds to various - * channel updates - * @return An OrdersChannel Promise - */ - async createWebSocketOrdersChannelAsync(url: string, handler: OrdersChannelHandler): Promise { - assert.isUri('url', url); - assert.isOrdersChannelHandler('handler', handler); - return new Promise((resolve, reject) => { - const client = new WebSocket.w3cwebsocket(url); - client.onopen = () => { - const ordersChannel = new WebSocketOrdersChannel(client, handler); - resolve(ordersChannel); - }; - client.onerror = err => { - reject(err); - }; - }); - }, -}; diff --git a/packages/connect/src/types.ts b/packages/connect/src/types.ts deleted file mode 100644 index 08a4506ac..000000000 --- a/packages/connect/src/types.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { - APIOrder, - AssetPairsItem, - AssetPairsRequestOpts, - FeeRecipientsResponse, - OrderbookRequest, - OrderbookResponse, - OrderConfigRequest, - OrderConfigResponse, - OrdersChannelSubscriptionOpts, - OrdersRequestOpts, - PagedRequestOpts, - PaginatedCollection, - SignedOrder, -} from '@0x/types'; - -export interface Client { - getAssetPairsAsync: ( - requestOpts?: AssetPairsRequestOpts & PagedRequestOpts, - ) => Promise>; - getOrdersAsync: (requestOpts?: OrdersRequestOpts & PagedRequestOpts) => Promise>; - getOrderAsync: (orderHash: string) => Promise; - getOrderbookAsync: (request: OrderbookRequest, requestOpts?: PagedRequestOpts) => Promise; - getOrderConfigAsync: (request: OrderConfigRequest) => Promise; - getFeeRecipientsAsync: (requestOpts?: PagedRequestOpts) => Promise; - submitOrderAsync: (signedOrder: SignedOrder) => Promise; -} - -export interface OrdersChannel { - subscribe: (subscriptionOpts: OrdersChannelSubscriptionOpts) => void; - close: () => void; -} - -export interface OrdersChannelHandler { - onUpdate: (channel: OrdersChannel, subscriptionOpts: OrdersChannelSubscriptionOpts, orders: APIOrder[]) => void; - onError: (channel: OrdersChannel, err: Error, subscriptionOpts?: OrdersChannelSubscriptionOpts) => void; - onClose: (channel: OrdersChannel) => void; -} - -export interface HttpRequestOptions { - params?: object; - payload?: object; -} - -export enum HttpRequestType { - Get = 'GET', - Post = 'POST', -} diff --git a/packages/connect/src/utils/assert.ts b/packages/connect/src/utils/assert.ts deleted file mode 100644 index de7536ffe..000000000 --- a/packages/connect/src/utils/assert.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { assert as sharedAssert } from '@0x/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 '@0x/json-schemas'; -// tslint:disable-next-line:no-unused-variable -import { ECSignature } from '@0x/types'; -// tslint:disable-next-line:no-unused-variable -import { BigNumber } from '@0x/utils'; -import * as _ from 'lodash'; - -export const assert = { - ...sharedAssert, - isOrdersChannelSubscriptionOpts(variableName: string, subscriptionOpts: any): void { - sharedAssert.doesConformToSchema( - variableName, - subscriptionOpts, - schemas.relayerApiOrdersChannelSubscribePayloadSchema, - ); - }, - isOrdersChannelHandler(variableName: string, handler: any): void { - 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/orders_channel_message_parser.ts b/packages/connect/src/utils/orders_channel_message_parser.ts deleted file mode 100644 index 1306a74b1..000000000 --- a/packages/connect/src/utils/orders_channel_message_parser.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { assert } from '@0x/assert'; -import { schemas } from '@0x/json-schemas'; -import * as _ from 'lodash'; - -import { OrdersChannelMessage, OrdersChannelMessageTypes } from '@0x/types'; - -import { relayerResponseJsonParsers } from './relayer_response_json_parsers'; - -export const ordersChannelMessageParser = { - parse(utf8Data: string): OrdersChannelMessage { - // 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: string = _.get(messageObj, 'requestId'); - assert.assert(!_.isUndefined(requestId), `Message is missing a requestId parameter: ${utf8Data}`); - assert.isString('requestId', requestId); - switch (type) { - case OrdersChannelMessageTypes.Update: { - assert.doesConformToSchema('message', messageObj, schemas.relayerApiOrdersChannelUpdateSchema); - const ordersJson = messageObj.payload; - const orders = relayerResponseJsonParsers.parseAPIOrdersJson(ordersJson); - return _.assign(messageObj, { payload: orders }); - } - default: { - return { - type: OrdersChannelMessageTypes.Unknown, - requestId, - payload: undefined, - }; - } - } - }, -}; diff --git a/packages/connect/src/utils/relayer_response_json_parsers.ts b/packages/connect/src/utils/relayer_response_json_parsers.ts deleted file mode 100644 index 2b1a658d1..000000000 --- a/packages/connect/src/utils/relayer_response_json_parsers.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { assert } from '@0x/assert'; -import { schemas } from '@0x/json-schemas'; -import { orderParsingUtils } from '@0x/order-utils'; - -import { - APIOrder, - AssetPairsItem, - AssetPairsResponse, - OrderbookResponse, - OrderConfigResponse, - OrdersResponse, -} from '@0x/types'; - -import { typeConverters } from './type_converters'; - -export const relayerResponseJsonParsers = { - parseAssetDataPairsJson(json: any): AssetPairsResponse { - assert.doesConformToSchema('assetDataPairsResponse', json, schemas.relayerApiAssetDataPairsResponseSchema); - return { ...json, records: relayerResponseJsonParsers.parseAssetPairsItemsJson(json.records) }; - }, - parseAssetPairsItemsJson(json: any): AssetPairsItem[] { - return json.map((assetDataPair: any) => { - return orderParsingUtils.convertStringsFieldsToBigNumbers(assetDataPair, [ - 'assetDataA.minAmount', - 'assetDataA.maxAmount', - 'assetDataB.minAmount', - 'assetDataB.maxAmount', - ]); - }); - }, - parseOrdersJson(json: any): OrdersResponse { - assert.doesConformToSchema('relayerApiOrdersResponse', json, schemas.relayerApiOrdersResponseSchema); - return { ...json, records: relayerResponseJsonParsers.parseAPIOrdersJson(json.records) }; - }, - parseAPIOrdersJson(json: any): APIOrder[] { - return json.map(relayerResponseJsonParsers.parseAPIOrderJson.bind(relayerResponseJsonParsers)); - }, - parseAPIOrderJson(json: any): APIOrder { - assert.doesConformToSchema('relayerApiOrder', json, schemas.relayerApiOrderSchema); - return typeConverters.convertAPIOrderStringFieldsToBigNumber(json); - }, - parseOrderbookResponseJson(json: any): OrderbookResponse { - assert.doesConformToSchema('orderBookResponse', json, schemas.relayerApiOrderbookResponseSchema); - return typeConverters.convertOrderbookStringFieldsToBigNumber(json); - }, - parseOrderConfigResponseJson(json: any): OrderConfigResponse { - assert.doesConformToSchema('orderConfigResponse', json, schemas.relayerApiOrderConfigResponseSchema); - return orderParsingUtils.convertStringsFieldsToBigNumbers(json, ['makerFee', 'takerFee']); - }, -}; diff --git a/packages/connect/src/utils/type_converters.ts b/packages/connect/src/utils/type_converters.ts deleted file mode 100644 index b262a516b..000000000 --- a/packages/connect/src/utils/type_converters.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { orderParsingUtils } from '@0x/order-utils'; -import * as _ from 'lodash'; - -import { APIOrder } from '@0x/types'; - -export const typeConverters = { - convertOrderbookStringFieldsToBigNumber(orderbook: any): any { - const bids = _.get(orderbook, 'bids', []); - const asks = _.get(orderbook, 'asks', []); - const convertedBids = { - ...bids, - records: bids.records.map((order: any) => typeConverters.convertAPIOrderStringFieldsToBigNumber(order)), - }; - const convertedAsks = { - ...asks, - records: asks.records.map((order: any) => typeConverters.convertAPIOrderStringFieldsToBigNumber(order)), - }; - return { - bids: convertedBids, - asks: convertedAsks, - }; - }, - convertAPIOrderStringFieldsToBigNumber(apiOrder: any): APIOrder { - return { ...apiOrder, order: orderParsingUtils.convertOrderStringFieldsToBigNumber(apiOrder.order) }; - }, -}; diff --git a/packages/connect/src/ws_orders_channel.ts b/packages/connect/src/ws_orders_channel.ts deleted file mode 100644 index 70a357c61..000000000 --- a/packages/connect/src/ws_orders_channel.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { OrdersChannelMessageTypes, OrdersChannelSubscriptionOpts } from '@0x/types'; -import * as _ from 'lodash'; -import { v4 as uuid } from 'uuid'; -import * as WebSocket from 'websocket'; - -import { OrdersChannel, OrdersChannelHandler } from './types'; -import { assert } from './utils/assert'; -import { ordersChannelMessageParser } from './utils/orders_channel_message_parser'; - -export interface OrdersChannelSubscriptionOptsMap { - [key: string]: OrdersChannelSubscriptionOpts; -} - -/** - * This class includes all the functionality related to interacting with a websocket endpoint - * that implements the standard relayer API v0 - */ -export class WebSocketOrdersChannel implements OrdersChannel { - private readonly _client: WebSocket.w3cwebsocket; - private readonly _handler: OrdersChannelHandler; - private readonly _subscriptionOptsMap: OrdersChannelSubscriptionOptsMap = {}; - /** - * Instantiates a new WebSocketOrdersChannel instance - * @param client A WebSocket client - * @param handler An OrdersChannelHandler instance that responds to various - * channel updates - * @return An instance of WebSocketOrdersChannel - */ - constructor(client: WebSocket.w3cwebsocket, handler: OrdersChannelHandler) { - assert.isOrdersChannelHandler('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 OrdersChannelSubscriptionOpts instance describing which - * assetData pair to subscribe to - */ - public subscribe(subscriptionOpts: OrdersChannelSubscriptionOpts): void { - assert.isOrdersChannelSubscriptionOpts('subscriptionOpts', subscriptionOpts); - assert.assert(this._client.readyState === WebSocket.w3cwebsocket.OPEN, 'WebSocket connection is closed'); - const requestId = uuid(); - this._subscriptionOptsMap[requestId] = subscriptionOpts; - const subscribeMessage = { - type: 'subscribe', - channel: 'orders', - requestId, - payload: subscriptionOpts, - }; - this._client.send(JSON.stringify(subscribeMessage)); - } - /** - * Close the websocket and stop receiving updates - */ - public close(): void { - this._client.close(); - } - 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; - } - try { - const data = message.data; - const parserResult = ordersChannelMessageParser.parse(data); - const subscriptionOpts = this._subscriptionOptsMap[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 OrdersChannelMessageTypes.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) { - this._handler.onError(this, error); - } - } -} diff --git a/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.json b/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.json deleted file mode 100644 index 603e9f67e..000000000 --- a/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "total": 43, - "page": 1, - "perPage": 100, - "records": [ - { - "assetDataA": { - "minAmount": "0", - "maxAmount": "10000000000000000000", - "precision": 5, - "assetData": "0xf47261b04c32345ced77393b3530b1eed0f346429d" - }, - "assetDataB": { - "minAmount": "0", - "maxAmount": "50000000000000000000", - "precision": 5, - "assetData": "0x0257179264389b814a946f3e92105513705ca6b990" - } - } - ] -} diff --git a/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.ts b/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.ts deleted file mode 100644 index 3ceeffdc8..000000000 --- a/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { BigNumber } from '@0x/utils'; - -import { AssetPairsResponse } from '@0x/types'; - -export const assetDataPairsResponse: AssetPairsResponse = { - total: 43, - page: 1, - perPage: 100, - records: [ - { - assetDataA: { - minAmount: new BigNumber('0'), - maxAmount: new BigNumber('10000000000000000000'), - precision: 5, - assetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d', - }, - assetDataB: { - minAmount: new BigNumber('0'), - maxAmount: new BigNumber('50000000000000000000'), - precision: 5, - assetData: '0x0257179264389b814a946f3e92105513705ca6b990', - }, - }, - ], -}; diff --git a/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.json b/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.json deleted file mode 100644 index b1d570b03..000000000 --- a/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "total": 3, - "page": 1, - "perPage": 10, - "records": [ - "0x6ec92694ea172ebc430c30fa31de87620967a082", - "0x9e56625509c2f60af937f23b7b532600390e8c8b", - "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32" - ] -} diff --git a/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.ts b/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.ts deleted file mode 100644 index 694433128..000000000 --- a/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { FeeRecipientsResponse } from '@0x/types'; - -export const feeRecipientsResponse: FeeRecipientsResponse = { - total: 3, - page: 1, - perPage: 10, - records: [ - '0x6ec92694ea172ebc430c30fa31de87620967a082', - '0x9e56625509c2f60af937f23b7b532600390e8c8b', - '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', - ], -}; diff --git a/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json b/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json deleted file mode 100644 index 8d2cdd8ed..000000000 --- a/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "order": { - "makerAddress": "0x9e56625509c2f60af937f23b7b532600390e8c8b", - "takerAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32", - "feeRecipientAddress": "0xb046140686d052fff581f63f8136cce132e857da", - "senderAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32", - "makerAssetAmount": "10000000000000000", - "takerAssetAmount": "20000000000000000", - "makerFee": "100000000000000", - "takerFee": "200000000000000", - "expirationTimeSeconds": "1532560590", - "salt": "1532559225", - "makerAssetData": "0xf47261b04c32345ced77393b3530b1eed0f346429d", - "takerAssetData": "0x0257179264389b814a946f3e92105513705ca6b990", - "exchangeAddress": "0x12459c951127e0c374ff9105dda097662a027093", - "signature": "0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33" - }, - "metaData": {} -} diff --git a/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.ts b/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.ts deleted file mode 100644 index 3d2fbdba8..000000000 --- a/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { BigNumber } from '@0x/utils'; - -export const orderResponse = { - order: { - makerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b', - takerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', - feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da', - senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', - makerAssetAmount: new BigNumber('10000000000000000'), - takerAssetAmount: new BigNumber('20000000000000000'), - makerFee: new BigNumber('100000000000000'), - takerFee: new BigNumber('200000000000000'), - expirationTimeSeconds: new BigNumber('1532560590'), - salt: new BigNumber('1532559225'), - makerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d', - takerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990', - exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093', - signature: '0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33', - }, - metaData: {}, -}; diff --git a/packages/connect/test/fixtures/standard_relayer_api/order_config.json b/packages/connect/test/fixtures/standard_relayer_api/order_config.json deleted file mode 100644 index 39da91e6d..000000000 --- a/packages/connect/test/fixtures/standard_relayer_api/order_config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "senderAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32", - "feeRecipientAddress": "0xb046140686d052fff581f63f8136cce132e857da", - "makerFee": "100000000000000", - "takerFee": "200000000000000" -} diff --git a/packages/connect/test/fixtures/standard_relayer_api/order_config.ts b/packages/connect/test/fixtures/standard_relayer_api/order_config.ts deleted file mode 100644 index 2290c39c0..000000000 --- a/packages/connect/test/fixtures/standard_relayer_api/order_config.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BigNumber } from '@0x/utils'; - -import { OrderConfigResponse } from '@0x/types'; - -export const orderConfigResponse: OrderConfigResponse = { - senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', - feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da', - makerFee: new BigNumber('100000000000000'), - takerFee: new BigNumber('200000000000000'), -}; diff --git a/packages/connect/test/fixtures/standard_relayer_api/orderbook.json b/packages/connect/test/fixtures/standard_relayer_api/orderbook.json deleted file mode 100644 index 5206c2217..000000000 --- a/packages/connect/test/fixtures/standard_relayer_api/orderbook.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "bids": { - "total": 325, - "page": 2, - "perPage": 100, - "records": [ - { - "order": { - "makerAddress": "0x9e56625509c2f60af937f23b7b532600390e8c8b", - "takerAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32", - "feeRecipientAddress": "0xb046140686d052fff581f63f8136cce132e857da", - "senderAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32", - "makerAssetAmount": "10000000000000000", - "takerAssetAmount": "20000000000000000", - "makerFee": "100000000000000", - "takerFee": "200000000000000", - "expirationTimeSeconds": "1532560590", - "salt": "1532559225", - "makerAssetData": "0xf47261b04c32345ced77393b3530b1eed0f346429d", - "takerAssetData": "0x0257179264389b814a946f3e92105513705ca6b990", - "exchangeAddress": "0x12459c951127e0c374ff9105dda097662a027093", - "signature": "0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33" - }, - "metaData": {} - } - ] - }, - "asks": { - "total": 500, - "page": 2, - "perPage": 100, - "records": [ - { - "order": { - "makerAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32", - "takerAddress": "0x9e56625509c2f60af937f23b7b532600390e8c8b", - "feeRecipientAddress": "0xb046140686d052fff581f63f8136cce132e857da", - "senderAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32", - "makerAssetAmount": "20000000000000000", - "takerAssetAmount": "10000000000000000", - "makerFee": "200000000000000", - "takerFee": "100000000000000", - "expirationTimeSeconds": "1532560590", - "salt": "1532559225", - "makerAssetData": "0x0257179264389b814a946f3e92105513705ca6b990", - "takerAssetData": "0xf47261b04c32345ced77393b3530b1eed0f346429d", - "exchangeAddress": "0x12459c951127e0c374ff9105dda097662a027093", - "signature": "0x013842a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b3518891" - }, - "metaData": {} - } - ] - } -} diff --git a/packages/connect/test/fixtures/standard_relayer_api/orderbook.ts b/packages/connect/test/fixtures/standard_relayer_api/orderbook.ts deleted file mode 100644 index de2d4eaea..000000000 --- a/packages/connect/test/fixtures/standard_relayer_api/orderbook.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { BigNumber } from '@0x/utils'; - -import { OrderbookResponse } from '@0x/types'; - -export const orderbookResponse: OrderbookResponse = { - bids: { - total: 325, - page: 2, - perPage: 100, - records: [ - { - order: { - makerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b', - takerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', - feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da', - senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', - makerAssetAmount: new BigNumber('10000000000000000'), - takerAssetAmount: new BigNumber('20000000000000000'), - makerFee: new BigNumber('100000000000000'), - takerFee: new BigNumber('200000000000000'), - expirationTimeSeconds: new BigNumber('1532560590'), - salt: new BigNumber('1532559225'), - makerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d', - takerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990', - exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093', - signature: '0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33', - }, - metaData: {}, - }, - ], - }, - asks: { - total: 500, - page: 2, - perPage: 100, - records: [ - { - order: { - makerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', - takerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b', - feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da', - senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', - makerAssetAmount: new BigNumber('20000000000000000'), - takerAssetAmount: new BigNumber('10000000000000000'), - makerFee: new BigNumber('200000000000000'), - takerFee: new BigNumber('100000000000000'), - expirationTimeSeconds: new BigNumber('1532560590'), - salt: new BigNumber('1532559225'), - makerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990', - takerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d', - exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093', - signature: '0x013842a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b3518891', - }, - metaData: {}, - }, - ], - }, -}; diff --git a/packages/connect/test/fixtures/standard_relayer_api/orders.json b/packages/connect/test/fixtures/standard_relayer_api/orders.json deleted file mode 100644 index 683612071..000000000 --- a/packages/connect/test/fixtures/standard_relayer_api/orders.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "total": 984, - "page": 1, - "perPage": 100, - "records": [ - { - "order": { - "makerAddress": "0x9e56625509c2f60af937f23b7b532600390e8c8b", - "takerAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32", - "feeRecipientAddress": "0xb046140686d052fff581f63f8136cce132e857da", - "senderAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32", - "makerAssetAmount": "10000000000000000", - "takerAssetAmount": "20000000000000000", - "makerFee": "100000000000000", - "takerFee": "200000000000000", - "expirationTimeSeconds": "1532560590", - "salt": "1532559225", - "makerAssetData": "0xf47261b04c32345ced77393b3530b1eed0f346429d", - "takerAssetData": "0x0257179264389b814a946f3e92105513705ca6b990", - "exchangeAddress": "0x12459c951127e0c374ff9105dda097662a027093", - "signature": "0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33" - }, - "metaData": {} - } - ] -} diff --git a/packages/connect/test/fixtures/standard_relayer_api/orders.ts b/packages/connect/test/fixtures/standard_relayer_api/orders.ts deleted file mode 100644 index ed1f588df..000000000 --- a/packages/connect/test/fixtures/standard_relayer_api/orders.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { BigNumber } from '@0x/utils'; - -import { OrdersResponse } from '@0x/types'; - -export const ordersResponse: OrdersResponse = { - total: 984, - page: 1, - perPage: 100, - records: [ - { - order: { - makerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b', - takerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', - feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da', - senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', - makerAssetAmount: new BigNumber('10000000000000000'), - takerAssetAmount: new BigNumber('20000000000000000'), - makerFee: new BigNumber('100000000000000'), - takerFee: new BigNumber('200000000000000'), - expirationTimeSeconds: new BigNumber('1532560590'), - salt: new BigNumber('1532559225'), - makerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d', - takerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990', - exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093', - signature: '0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33', - }, - metaData: {}, - }, - ], -}; diff --git a/packages/connect/test/fixtures/standard_relayer_api/unknown_orders_channel_message.ts b/packages/connect/test/fixtures/standard_relayer_api/unknown_orders_channel_message.ts deleted file mode 100644 index b6c0cd50c..000000000 --- a/packages/connect/test/fixtures/standard_relayer_api/unknown_orders_channel_message.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as orderResponseJSON from './order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json'; - -const orderJSONString = JSON.stringify(orderResponseJSON); - -export const unknownOrdersChannelMessage = `{ - "type": "superGoodUpdate", - "channel": "orderbook", - "requestId": "6ce8c5a6-5c46-4027-a44a-51831c77b8a1", - "payload": [${orderJSONString}] -}`; diff --git a/packages/connect/test/fixtures/standard_relayer_api/update_orders_channel_message.ts b/packages/connect/test/fixtures/standard_relayer_api/update_orders_channel_message.ts deleted file mode 100644 index c18a2c789..000000000 --- a/packages/connect/test/fixtures/standard_relayer_api/update_orders_channel_message.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as apiOrderJSON from './order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json'; - -const apiOrderJSONString = JSON.stringify(apiOrderJSON); - -export const updateOrdersChannelMessage = `{ - "type": "update", - "channel": "orders", - "requestId": "5a1ce3a2-22b9-41e6-a615-68077512e9e2", - "payload": [${apiOrderJSONString}] -}`; - -export const malformedUpdateOrdersChannelMessage = `{ - "type": "update", - "channel": "orders", - "requestId": "4d8efcee-adde-4475-9601-f0b30962ca2b", - "payload": {} -}`; diff --git a/packages/connect/test/http_client_test.ts b/packages/connect/test/http_client_test.ts deleted file mode 100644 index f799ca849..000000000 --- a/packages/connect/test/http_client_test.ts +++ /dev/null @@ -1,193 +0,0 @@ -import { BigNumber } from '@0x/utils'; -import * as chai from 'chai'; -import * as chaiAsPromised from 'chai-as-promised'; -import * as dirtyChai from 'dirty-chai'; -import * as fetchMock from 'fetch-mock'; -import 'mocha'; - -import { HttpClient } from '../src/index'; - -import { assetDataPairsResponse } from './fixtures/standard_relayer_api/asset_pairs'; -import * as assetDataPairsResponseJSON from './fixtures/standard_relayer_api/asset_pairs.json'; -import { feeRecipientsResponse } from './fixtures/standard_relayer_api/fee_recipients'; -import * as feeRecipientsResponseJSON from './fixtures/standard_relayer_api/fee_recipients.json'; -import { orderResponse } from './fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f'; -import * as orderResponseJSON from './fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json'; -import { orderConfigResponse } from './fixtures/standard_relayer_api/order_config'; -import * as orderConfigResponseJSON from './fixtures/standard_relayer_api/order_config.json'; -import { orderbookResponse } from './fixtures/standard_relayer_api/orderbook'; -import * as orderbookJSON from './fixtures/standard_relayer_api/orderbook.json'; -import { ordersResponse } from './fixtures/standard_relayer_api/orders'; -import * as ordersResponseJSON from './fixtures/standard_relayer_api/orders.json'; - -chai.config.includeStack = true; -chai.use(dirtyChai); -chai.use(chaiAsPromised); -const expect = chai.expect; - -describe('HttpClient', () => { - const relayUrl = 'https://example.com'; - const relayerClient = new HttpClient(relayUrl); - beforeEach(() => { - fetchMock.restore(); - }); - describe('#constructor', () => { - it('should remove trailing slashes from api url', async () => { - const urlWithTrailingSlash = 'https://slash.com/'; - const urlWithoutTrailingSlash = 'https://slash.com'; - const client = new HttpClient(urlWithTrailingSlash); - const sanitizedUrl = (client as any)._apiEndpointUrl; - expect(sanitizedUrl).to.be.deep.equal(urlWithoutTrailingSlash); - }); - }); - describe('#getAssetPairsAsync', () => { - const url = `${relayUrl}/asset_pairs`; - it('gets assetData pairs with default options when none are provided', async () => { - fetchMock.get(url, assetDataPairsResponseJSON); - const assetDataPairs = await relayerClient.getAssetPairsAsync(); - expect(assetDataPairs).to.be.deep.equal(assetDataPairsResponse); - }); - it('gets assetData pairs with specified request options', async () => { - const assetData = '0xf47261b04c32345ced77393b3530b1eed0f346429d'; - const assetPairsRequestOpts = { - assetDataA: assetData, - page: 3, - perPage: 50, - networkdId: 42, - }; - const urlWithQuery = `${url}?assetDataA=${assetData}&networkdId=42&page=3&perPage=50`; - fetchMock.get(urlWithQuery, assetDataPairsResponseJSON); - const assetDataPairs = await relayerClient.getAssetPairsAsync(assetPairsRequestOpts); - expect(assetDataPairs).to.be.deep.equal(assetDataPairsResponse); - }); - it('throws an error for invalid JSON response', async () => { - fetchMock.get(url, { test: 'dummy' }); - expect(relayerClient.getAssetPairsAsync()).to.be.rejected(); - }); - }); - describe('#getOrdersAsync', () => { - const url = `${relayUrl}/orders`; - it('gets orders with default options when none are provided', async () => { - fetchMock.get(url, ordersResponseJSON); - const orders = await relayerClient.getOrdersAsync(); - expect(orders).to.be.deep.equal(ordersResponse); - }); - it('gets orders with specified request options', async () => { - const assetDataAddress = '0x323b5d4c32345ced77393b3530b1eed0f346429d'; - const ordersRequest = { - assetDataAddress, - page: 3, - perPage: 50, - networkdId: 42, - }; - const urlWithQuery = `${url}?assetDataAddress=${assetDataAddress}&networkdId=42&page=3&perPage=50`; - fetchMock.get(urlWithQuery, ordersResponseJSON); - const orders = await relayerClient.getOrdersAsync(ordersRequest); - expect(orders).to.be.deep.equal(ordersResponse); - }); - it('throws an error for invalid JSON response', async () => { - fetchMock.get(url, { test: 'dummy' }); - expect(relayerClient.getOrdersAsync()).to.be.rejected(); - }); - }); - describe('#getOrderAsync', () => { - const orderHash = '0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f'; - const url = `${relayUrl}/order/${orderHash}`; - it('gets order', async () => { - fetchMock.get(url, orderResponseJSON); - const order = await relayerClient.getOrderAsync(orderHash); - expect(order).to.be.deep.equal(orderResponse); - }); - it('throws an error for invalid JSON response', async () => { - fetchMock.get(url, { test: 'dummy' }); - expect(relayerClient.getOrderAsync(orderHash)).to.be.rejected(); - }); - }); - describe('#getOrderBookAsync', () => { - const request = { - baseAssetData: '0x323b5d4c32345ced77393b3530b1eed0f346429d', - quoteAssetData: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', - }; - const url = `${relayUrl}/orderbook`; - it('gets orderbook with default page options when none are provided', async () => { - const urlWithQuery = `${url}?baseAssetData=${request.baseAssetData}"eAssetData=${ - request.quoteAssetData - }`; - fetchMock.get(urlWithQuery, orderbookJSON); - const orderbook = await relayerClient.getOrderbookAsync(request); - expect(orderbook).to.be.deep.equal(orderbookResponse); - }); - it('gets orderbook with specified page options', async () => { - const urlWithQuery = `${url}?baseAssetData=${ - request.baseAssetData - }&networkId=42&page=3&perPage=50"eAssetData=${request.quoteAssetData}`; - fetchMock.get(urlWithQuery, orderbookJSON); - const pagedRequestOptions = { - page: 3, - perPage: 50, - networkId: 42, - }; - const orderbook = await relayerClient.getOrderbookAsync(request, pagedRequestOptions); - expect(orderbook).to.be.deep.equal(orderbookResponse); - }); - it('throws an error for invalid JSON response', async () => { - fetchMock.get(url, { test: 'dummy' }); - expect(relayerClient.getOrderbookAsync(request)).to.be.rejected(); - }); - }); - describe('#getOrderConfigAsync', () => { - const request = { - makerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b', - takerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', - makerAssetAmount: new BigNumber('10000000000000000'), - takerAssetAmount: new BigNumber('20000000000000000'), - expirationTimeSeconds: new BigNumber('1532560590'), - makerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d', - takerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990', - exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093', - }; - const url = `${relayUrl}/order_config`; - it('gets order config', async () => { - fetchMock.post(url, orderConfigResponseJSON); - const fees = await relayerClient.getOrderConfigAsync(request); - expect(fees).to.be.deep.equal(orderConfigResponse); - }); - it('does not mutate input', async () => { - fetchMock.post(url, orderConfigResponseJSON); - const makerAssetAmountBefore = request.makerAssetAmount; - const takerAssetAmountBefore = request.takerAssetAmount; - const expirationTimeSecondsBefore = request.expirationTimeSeconds; - await relayerClient.getOrderConfigAsync(request); - expect(makerAssetAmountBefore).to.be.deep.equal(request.makerAssetAmount); - expect(takerAssetAmountBefore).to.be.deep.equal(request.takerAssetAmount); - expect(expirationTimeSecondsBefore).to.be.deep.equal(request.expirationTimeSeconds); - }); - it('throws an error for invalid JSON response', async () => { - fetchMock.post(url, { test: 'dummy' }); - expect(relayerClient.getOrderConfigAsync(request)).to.be.rejected(); - }); - }); - describe('#getFeeRecipientsAsync', () => { - const url = `${relayUrl}/fee_recipients`; - it('gets fee recipients with default page options when none are provided', async () => { - fetchMock.get(url, feeRecipientsResponseJSON); - const feeRecipients = await relayerClient.getFeeRecipientsAsync(); - expect(feeRecipients).to.be.deep.equal(feeRecipientsResponse); - }); - it('gets fee recipient with specified page options', async () => { - const urlWithQuery = `${url}?networkId=42&page=3&perPage=50`; - fetchMock.get(urlWithQuery, feeRecipientsResponseJSON); - const pagedRequestOptions = { - page: 3, - perPage: 50, - networkId: 42, - }; - const feeRecipients = await relayerClient.getFeeRecipientsAsync(pagedRequestOptions); - expect(feeRecipients).to.be.deep.equal(feeRecipientsResponse); - }); - it('throws an error for invalid JSON response', async () => { - fetchMock.get(url, { test: 'dummy' }); - expect(relayerClient.getFeeRecipientsAsync()).to.be.rejected(); - }); - }); -}); diff --git a/packages/connect/test/orders_channel_factory_test.ts b/packages/connect/test/orders_channel_factory_test.ts deleted file mode 100644 index 29aa87c65..000000000 --- a/packages/connect/test/orders_channel_factory_test.ts +++ /dev/null @@ -1,34 +0,0 @@ -import * as chai from 'chai'; -import * as dirtyChai from 'dirty-chai'; -import * as _ from 'lodash'; - -import 'mocha'; - -import { ordersChannelFactory } from '../src/orders_channel_factory'; - -chai.config.includeStack = true; -chai.use(dirtyChai); -const expect = chai.expect; -const emptyOrdersChannelHandler = { - onUpdate: _.noop.bind(_), - onError: _.noop.bind(_), - onClose: _.noop.bind(_), -}; - -describe('ordersChannelFactory', () => { - const websocketUrl = 'ws://localhost:8080'; - describe('#createWebSocketOrdersChannelAsync', () => { - it('throws when input is not a url', () => { - const badUrlInput = 54; - expect( - ordersChannelFactory.createWebSocketOrdersChannelAsync(badUrlInput as any, emptyOrdersChannelHandler), - ).to.be.rejected(); - }); - it('throws when handler has the incorrect members', () => { - const badHandlerInput = {}; - expect( - ordersChannelFactory.createWebSocketOrdersChannelAsync(websocketUrl, badHandlerInput as any), - ).to.be.rejected(); - }); - }); -}); diff --git a/packages/connect/test/orders_channel_message_parsers_test.ts b/packages/connect/test/orders_channel_message_parsers_test.ts deleted file mode 100644 index 4d4a2d23f..000000000 --- a/packages/connect/test/orders_channel_message_parsers_test.ts +++ /dev/null @@ -1,59 +0,0 @@ -import * as chai from 'chai'; -import * as dirtyChai from 'dirty-chai'; -import 'mocha'; - -import { ordersChannelMessageParser } from '../src/utils/orders_channel_message_parser'; - -import { orderResponse } from './fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f'; -import { unknownOrdersChannelMessage } from './fixtures/standard_relayer_api/unknown_orders_channel_message'; -import { - malformedUpdateOrdersChannelMessage, - updateOrdersChannelMessage, -} from './fixtures/standard_relayer_api/update_orders_channel_message'; - -chai.config.includeStack = true; -chai.use(dirtyChai); -const expect = chai.expect; - -describe('ordersChannelMessageParser', () => { - describe('#parser', () => { - it('parses update messages', () => { - const updateMessage = ordersChannelMessageParser.parse(updateOrdersChannelMessage); - expect(updateMessage.type).to.be.equal('update'); - expect(updateMessage.payload).to.be.deep.equal([orderResponse]); - }); - it('returns unknown message for messages with unsupported types', () => { - const unknownMessage = ordersChannelMessageParser.parse(unknownOrdersChannelMessage); - expect(unknownMessage.type).to.be.equal('unknown'); - expect(unknownMessage.payload).to.be.undefined(); - }); - it('throws when message does not include a type', () => { - const typelessMessage = `{ - "channel": "orders", - "requestId": "4d8efcee-adde-4475-9601-f0b30962ca2b", - "payload": [] - }`; - const badCall = () => ordersChannelMessageParser.parse(typelessMessage); - expect(badCall).throws(`Message is missing a type parameter: ${typelessMessage}`); - }); - it('throws when type is not a string', () => { - const messageWithBadType = `{ - "type": 1, - "channel": "orders", - "requestId": "4d8efcee-adde-4475-9601-f0b30962ca2b", - "payload": [] - }`; - const badCall = () => ordersChannelMessageParser.parse(messageWithBadType); - expect(badCall).throws('Expected type to be of type string, encountered: 1'); - }); - it('throws when update message has malformed payload', () => { - const badCall = () => ordersChannelMessageParser.parse(malformedUpdateOrdersChannelMessage); - expect(badCall).throws(/^Expected message to conform to schema/); - }); - it('throws when input message is not valid JSON', () => { - const nonJsonString = 'h93b{sdfs9fsd f'; - const badCall = () => ordersChannelMessageParser.parse(nonJsonString); - expect(badCall).throws('Unexpected token h in JSON at position 0'); - }); - }); -}); diff --git a/packages/connect/test/ws_orders_channel_test.ts b/packages/connect/test/ws_orders_channel_test.ts deleted file mode 100644 index df30bc41d..000000000 --- a/packages/connect/test/ws_orders_channel_test.ts +++ /dev/null @@ -1,49 +0,0 @@ -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 { WebSocketOrdersChannel } from '../src/ws_orders_channel'; - -chai.config.includeStack = true; -chai.use(dirtyChai); -const expect = chai.expect; -const emptyOrdersChannelHandler = { - onUpdate: _.noop.bind(_), - onError: _.noop.bind(_), - onClose: _.noop.bind(_), -}; - -describe('WebSocketOrdersChannel', () => { - const websocketUrl = 'ws://localhost:8080'; - const openClient = new WebSocket.w3cwebsocket(websocketUrl); - Sinon.stub(openClient, 'readyState').get(() => WebSocket.w3cwebsocket.OPEN); - Sinon.stub(openClient, 'send').callsFake(_.noop.bind(_)); - const openOrdersChannel = new WebSocketOrdersChannel(openClient, emptyOrdersChannelHandler); - const subscriptionOpts = { - baseAssetData: '0x323b5d4c32345ced77393b3530b1eed0f346429d', - quoteAssetData: '0xef7fff64389b814a946f3e92105513705ca6b990', - limit: 100, - }; - describe('#subscribe', () => { - it('throws when subscriptionOpts does not conform to schema', () => { - const badSubscribeCall = openOrdersChannel.subscribe.bind(openOrdersChannel, { - makerAssetData: 5, - }); - expect(badSubscribeCall).throws(); - }); - it('does not throw when inputs are of correct types', () => { - const goodSubscribeCall = openOrdersChannel.subscribe.bind(openOrdersChannel, 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 closedOrdersChannel = new WebSocketOrdersChannel(closedClient, emptyOrdersChannelHandler); - const badSubscribeCall = closedOrdersChannel.subscribe.bind(closedOrdersChannel, subscriptionOpts); - expect(badSubscribeCall).throws('WebSocket connection is closed'); - }); - }); -}); diff --git a/packages/connect/tsconfig.json b/packages/connect/tsconfig.json deleted file mode 100644 index 2ee711adc..000000000 --- a/packages/connect/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "lib", - "rootDir": "." - }, - "include": ["./src/**/*", "./test/**/*"] -} diff --git a/packages/connect/tslint.json b/packages/connect/tslint.json deleted file mode 100644 index dd9053357..000000000 --- a/packages/connect/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@0x/tslint-config"] -} diff --git a/packages/connect/typedoc-tsconfig.json b/packages/connect/typedoc-tsconfig.json deleted file mode 100644 index c9b0af1ae..000000000 --- a/packages/connect/typedoc-tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../typedoc-tsconfig", - "compilerOptions": { - "outDir": "lib" - }, - "include": ["./src/**/*", "./test/**/*"] -} diff --git a/packages/contract-addresses/CHANGELOG.json b/packages/contract-addresses/CHANGELOG.json deleted file mode 100644 index 8800f2f73..000000000 --- a/packages/contract-addresses/CHANGELOG.json +++ /dev/null @@ -1,73 +0,0 @@ -[ - { - "version": "2.2.0", - "changes": [ - { - "note": "Added migration for `MultiAssetProxy` contract", - "pr": 1503 - } - ], - "timestamp": 1547561734 - }, - { - "version": "2.1.0", - "changes": [ - { - "note": "Added testnet entries for Dutch Auction contract (kovan,rinkeby,ropsten)", - "pr": 1465 - } - ], - "timestamp": 1547040760 - }, - { - "version": "2.0.0", - "changes": [ - { - "note": "Redeployed Rinkeby with testnet Exchange artifact", - "pr": 1318 - }, - { - "note": "Added Ganache snapshot addresses for network 50", - "pr": 1318 - } - ], - "timestamp": 1543401373 - }, - { - "version": "1.2.0", - "changes": [ - { - "note": "Rinkeby Deployment" - } - ], - "timestamp": 1542821676 - }, - { - "version": "1.1.0", - "changes": [ - { - "pr": 1192, - "note": "Update Forwarder addresses" - } - ], - "timestamp": 1541740904 - }, - { - "version": "1.0.1", - "changes": [ - { - "pr": 1105, - "note": "Initial release" - } - ], - "timestamp": 1539871071 - }, - { - "version": "1.0.0", - "changes": [ - { - "note": "Unpublished Package" - } - ] - } -] diff --git a/packages/contract-addresses/CHANGELOG.md b/packages/contract-addresses/CHANGELOG.md deleted file mode 100644 index 1f3d187a4..000000000 --- a/packages/contract-addresses/CHANGELOG.md +++ /dev/null @@ -1,35 +0,0 @@ - - -CHANGELOG - -## v2.2.0 - _January 15, 2019_ - - * Added migration for `MultiAssetProxy` contract (#1503) - -## v2.1.0 - _January 9, 2019_ - - * Added testnet entries for Dutch Auction contract (kovan,rinkeby,ropsten) (#1465) - -## v2.0.0 - _November 28, 2018_ - - * Redeployed Rinkeby with testnet Exchange artifact (#1318) - * Added Ganache snapshot addresses for network 50 (#1318) - -## v1.2.0 - _November 21, 2018_ - - * Rinkeby Deployment - -## v1.1.0 - _November 9, 2018_ - - * Update Forwarder addresses (#1192) - -## v1.0.1 - _October 18, 2018_ - - * Initial release (#1105) - -## v1.0.0 - _Invalid date_ - - * Unpublished Package diff --git a/packages/contract-addresses/README.md b/packages/contract-addresses/README.md deleted file mode 100644 index a4040cb54..000000000 --- a/packages/contract-addresses/README.md +++ /dev/null @@ -1,68 +0,0 @@ -## @0x/contract-addresses - -A tiny utility library for getting known deployed contract addresses for a -particular network. - -## Installation - -```bash -yarn add @0x/contract-addresses -``` - -**Import** - -```typescript -import { getContractAddressesForNetworkOrThrow } from '@0x/contract-addresses'; -``` - -or - -```javascript -var getContractAddressesForNetworkOrThrow = require('@0x/contract-addresses').getContractAddressesForNetworkOrThrow; -``` - -## Contributing - -We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. - -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. - -### Install dependencies - -If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: - -```bash -yarn config set workspaces-experimental true -``` - -Then install dependencies - -```bash -yarn install -``` - -### Build - -To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: - -```bash -PKG=@0x/contract-addresses yarn build -``` - -### Clean - -```bash -yarn clean -``` - -### Lint - -```bash -yarn lint -``` - -### Run Tests - -```bash -yarn test -``` diff --git a/packages/contract-addresses/package.json b/packages/contract-addresses/package.json deleted file mode 100644 index 260322081..000000000 --- a/packages/contract-addresses/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "@0x/contract-addresses", - "version": "2.2.0", - "engines": { - "node": ">=6.12" - }, - "description": "Used to get known addresses of deployed 0x contracts", - "main": "lib/src/index.js", - "directories": { - "test": "test" - }, - "scripts": { - "build": "yarn tsc -b", - "build:ci": "yarn build", - "clean": "shx rm -rf lib" - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo.git" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x-monorepo/issues" - }, - "homepage": "https://github.com/0xProject/0x-monorepo/packages/contract-addresses/README.md", - "devDependencies": { - "@types/lodash": "4.14.104", - "shx": "^0.2.2", - "typescript": "3.0.1" - }, - "dependencies": { - "lodash": "^4.17.5" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/contract-addresses/src/index.ts b/packages/contract-addresses/src/index.ts deleted file mode 100644 index 4f580e825..000000000 --- a/packages/contract-addresses/src/index.ts +++ /dev/null @@ -1,98 +0,0 @@ -import * as _ from 'lodash'; - -export interface ContractAddresses { - erc20Proxy: string; - erc721Proxy: string; - zrxToken: string; - etherToken: string; - exchange: string; - assetProxyOwner: string; - forwarder: string; - orderValidator: string; - dutchAuction: string; -} - -export enum NetworkId { - Mainnet = 1, - Ropsten = 3, - Rinkeby = 4, - Kovan = 42, - Ganache = 50, -} - -const NULL_ADDRESS = '0x0000000000000000000000000000000000000000'; - -const networkToAddresses: { [networkId: number]: ContractAddresses } = { - 1: { - erc20Proxy: '0x2240dab907db71e64d3e0dba4800c83b5c502d4e', - erc721Proxy: '0x208e41fb445f1bb1b6780d58356e81405f3e6127', - zrxToken: '0xe41d2489571d322189246dafa5ebde1f4699f498', - etherToken: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', - exchange: '0x4f833a24e1f95d70f028921e27040ca56e09ab0b', - assetProxyOwner: '0x17992e4ffb22730138e4b62aaa6367fa9d3699a6', - forwarder: '0x5468a1dc173652ee28d249c271fa9933144746b1', - orderValidator: '0x9463e518dea6810309563c81d5266c1b1d149138', - // @todo hysz/dekz: Add mainnet address once deployed. - dutchAuction: NULL_ADDRESS, - }, - 3: { - erc20Proxy: '0xb1408f4c245a23c31b98d2c626777d4c0d766caa', - erc721Proxy: '0xe654aac058bfbf9f83fcaee7793311dd82f6ddb4', - zrxToken: '0xff67881f8d12f372d91baae9752eb3631ff0ed00', - etherToken: '0xc778417e063141139fce010982780140aa0cd5ab', - exchange: '0x4530c0483a1633c7a1c97d2c53721caff2caaaaf', - assetProxyOwner: '0xf5fa5b5fed2727a0e44ac67f6772e97977aa358b', - forwarder: '0x2240dab907db71e64d3e0dba4800c83b5c502d4e', - orderValidator: '0x90431a90516ab49af23a0530e04e8c7836e7122f', - dutchAuction: '0x2df6b59309f35ada230ec7d61d7d97355017a1df', - }, - 4: { - exchange: '0xbce0b5f6eb618c565c3e5f5cd69652bbc279f44e', - erc20Proxy: '0x2f5ae4f6106e89b4147651688a92256885c5f410', - erc721Proxy: '0x7656d773e11ff7383a14dcf09a9c50990481cd10', - zrxToken: '0x8080c7e4b81ecf23aa6f877cfbfd9b0c228c6ffa', - etherToken: '0xc778417e063141139fce010982780140aa0cd5ab', - assetProxyOwner: '0xe1703da878afcebff5b7624a826902af475b9c03', - forwarder: '0x2d40589abbdee84961f3a7656b9af7adb0ee5ab4', - orderValidator: '0x0c5173a51e26b29d6126c686756fb9fbef71f762', - dutchAuction: '0xdd7bd6437e67c422879364740ab5855fe3dc41f7', - }, - 42: { - erc20Proxy: '0xf1ec01d6236d3cd881a0bf0130ea25fe4234003e', - erc721Proxy: '0x2a9127c745688a165106c11cd4d647d2220af821', - zrxToken: '0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa', - etherToken: '0xd0a1e359811322d97991e03f863a0c30c2cf029c', - exchange: '0x35dd2932454449b14cee11a94d3674a936d5d7b2', - assetProxyOwner: '0x2c824d2882baa668e0d5202b1e7f2922278703f8', - forwarder: '0x17992e4ffb22730138e4b62aaa6367fa9d3699a6', - orderValidator: '0xb389da3d204b412df2f75c6afb3d0a7ce0bc283d', - dutchAuction: '0xe11667fb51f34c5367f40d7e379327ce32ee7150', - }, - // NetworkId 50 represents our Ganache snapshot generated from migrations. - 50: { - erc20Proxy: '0x1dc4c1cefef38a777b15aa20260a54e584b16c48', - erc721Proxy: '0x1d7022f5b17d2f8b695918fb48fa1089c9f85401', - zrxToken: '0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c', - etherToken: '0x0b1ba0af832d7c05fd64161e0db78e85978e8082', - exchange: '0x48bacb9266a570d521063ef5dd96e61686dbe788', - assetProxyOwner: '0x04b5dadd2c0d6a261bfafbc964e0cac48585def3', - forwarder: '0x6000eca38b8b5bba64986182fe2a69c57f6b5414', - orderValidator: '0x32eecaf51dfea9618e9bc94e9fbfddb1bbdcba15', - dutchAuction: '0x7e3f4e1deb8d3a05d9d2da87d9521268d0ec3239', - }, -}; - -/** - * Used to get addresses of contracts that have been deployed to either the - * Ethereum mainnet or a supported testnet. Throws if there are no known - * contracts deployed on the corresponding network. - * @param networkId The desired networkId. - * @returns The set of addresses for contracts which have been deployed on the - * given networkId. - */ -export function getContractAddressesForNetworkOrThrow(networkId: NetworkId): ContractAddresses { - if (_.isUndefined(networkToAddresses[networkId])) { - throw new Error(`Unknown network id (${networkId}). No known 0x contracts have been deployed on this network.`); - } - return networkToAddresses[networkId]; -} diff --git a/packages/contract-addresses/tsconfig.json b/packages/contract-addresses/tsconfig.json deleted file mode 100644 index 233008d61..000000000 --- a/packages/contract-addresses/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "lib", - "rootDir": "." - }, - "include": ["./src/**/*"] -} diff --git a/packages/contract-addresses/tslint.json b/packages/contract-addresses/tslint.json deleted file mode 100644 index dd9053357..000000000 --- a/packages/contract-addresses/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@0x/tslint-config"] -} diff --git a/packages/contract-artifacts/CHANGELOG.json b/packages/contract-artifacts/CHANGELOG.json deleted file mode 100644 index c488fa5c5..000000000 --- a/packages/contract-artifacts/CHANGELOG.json +++ /dev/null @@ -1,60 +0,0 @@ -[ - { - "version": "1.3.0", - "changes": [ - { - "note": "Added artifact for `MultiAssetProxy` contract", - "pr": 1503 - } - ], - "timestamp": 1547561734 - }, - { - "version": "1.2.0", - "changes": [ - { - "pr": 1465, - "note": "Added artifact for Dutch Auction contract" - } - ], - "timestamp": 1547040760 - }, - { - "version": "1.1.2", - "changes": [ - { - "pr": 1309, - "note": "Update Exchange artifact to receive ZRX asset data as a constructor argument" - } - ], - "timestamp": 1543401373 - }, - { - "version": "1.1.0", - "changes": [ - { - "pr": 1192, - "note": "Update Forwarder artifact" - } - ], - "timestamp": 1541740904 - }, - { - "version": "1.0.1", - "changes": [ - { - "pr": 1105, - "note": "Initial release" - } - ], - "timestamp": 1539871071 - }, - { - "version": "1.0.0", - "changes": [ - { - "note": "Unpublished Package" - } - ] - } -] diff --git a/packages/contract-artifacts/CHANGELOG.md b/packages/contract-artifacts/CHANGELOG.md deleted file mode 100644 index c1118a3b9..000000000 --- a/packages/contract-artifacts/CHANGELOG.md +++ /dev/null @@ -1,30 +0,0 @@ - - -CHANGELOG - -## v1.3.0 - _January 15, 2019_ - - * Added artifact for `MultiAssetProxy` contract (#1503) - -## v1.2.0 - _January 9, 2019_ - - * Added artifact for Dutch Auction contract (#1465) - -## v1.1.2 - _November 28, 2018_ - - * Update Exchange artifact to receive ZRX asset data as a constructor argument (#1309) - -## v1.1.0 - _November 9, 2018_ - - * Update Forwarder artifact (#1192) - -## v1.0.1 - _October 18, 2018_ - - * Initial release (#1105) - -## v1.0.0 - _Invalid date_ - - * Unpublished Package diff --git a/packages/contract-artifacts/README.md b/packages/contract-artifacts/README.md deleted file mode 100644 index 5a382c308..000000000 --- a/packages/contract-artifacts/README.md +++ /dev/null @@ -1,67 +0,0 @@ -## @0x/contract-artifacts - -Smart contract compilation artifacts for the latest version of the 0x Protocol. - -## Installation - -```bash -yarn add @0x/contract-artifacts -``` - -**Import** - -```typescript -import * as artifacts from '@0x/contract-artifacts'; -``` - -or - -```javascript -var artifacts = require('@0x/contract-artifacts'); -``` - -## Contributing - -We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. - -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. - -### Install dependencies - -If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: - -```bash -yarn config set workspaces-experimental true -``` - -Then install dependencies - -```bash -yarn install -``` - -### Build - -To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: - -```bash -PKG=@0x/contract-artifacts yarn build -``` - -### Clean - -```bash -yarn clean -``` - -### Lint - -```bash -yarn lint -``` - -### Run Tests - -```bash -yarn test -``` diff --git a/packages/contract-artifacts/artifacts/AssetProxyOwner.json b/packages/contract-artifacts/artifacts/AssetProxyOwner.json deleted file mode 100644 index e5fad3aef..000000000 --- a/packages/contract-artifacts/artifacts/AssetProxyOwner.json +++ /dev/null @@ -1,699 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "AssetProxyOwner", - "compilerOutput": { - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "owners", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "removeOwner", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "revokeConfirmation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "isOwner", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "address" - } - ], - "name": "confirmations", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "executeRemoveAuthorizedAddressAtIndex", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "secondsTimeLocked", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "pending", - "type": "bool" - }, - { - "name": "executed", - "type": "bool" - } - ], - "name": "getTransactionCount", - "outputs": [ - { - "name": "count", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "assetProxyContract", - "type": "address" - }, - { - "name": "isRegistered", - "type": "bool" - } - ], - "name": "registerAssetProxy", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "addOwner", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "isConfirmed", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_secondsTimeLocked", - "type": "uint256" - } - ], - "name": "changeTimeLock", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "isAssetProxyRegistered", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "getConfirmationCount", - "outputs": [ - { - "name": "count", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "transactions", - "outputs": [ - { - "name": "destination", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - }, - { - "name": "data", - "type": "bytes" - }, - { - "name": "executed", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getOwners", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "from", - "type": "uint256" - }, - { - "name": "to", - "type": "uint256" - }, - { - "name": "pending", - "type": "bool" - }, - { - "name": "executed", - "type": "bool" - } - ], - "name": "getTransactionIds", - "outputs": [ - { - "name": "_transactionIds", - "type": "uint256[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "getConfirmations", - "outputs": [ - { - "name": "_confirmations", - "type": "address[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "transactionCount", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_required", - "type": "uint256" - } - ], - "name": "changeRequirement", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "confirmTransaction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "destination", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - }, - { - "name": "data", - "type": "bytes" - } - ], - "name": "submitTransaction", - "outputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "confirmationTimes", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_OWNER_COUNT", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "required", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "newOwner", - "type": "address" - } - ], - "name": "replaceOwner", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "executeTransaction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "name": "_owners", - "type": "address[]" - }, - { - "name": "_assetProxyContracts", - "type": "address[]" - }, - { - "name": "_required", - "type": "uint256" - }, - { - "name": "_secondsTimeLocked", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "assetProxyContract", - "type": "address" - }, - { - "indexed": false, - "name": "isRegistered", - "type": "bool" - } - ], - "name": "AssetProxyRegistration", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - }, - { - "indexed": false, - "name": "confirmationTime", - "type": "uint256" - } - ], - "name": "ConfirmationTimeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "secondsTimeLocked", - "type": "uint256" - } - ], - "name": "TimeLockChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Confirmation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Revocation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Submission", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Execution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "ExecutionFailure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - } - ], - "name": "OwnerAddition", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - } - ], - "name": "OwnerRemoval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "required", - "type": "uint256" - } - ], - "name": "RequirementChange", - "type": "event" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": - "0x60806040523480156200001157600080fd5b50604051620024633803806200246383398101604090815281516020830151918301516060840151918401805190949390930192909190600090819086908590859083908390869082603282118015906200006c5750818111155b80156200007857508015155b80156200008457508115155b15156200009057600080fd5b600092505b84518310156200016857600260008685815181101515620000b257fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff161580156200010857508483815181101515620000f057fe5b90602001906020020151600160a060020a0316600014155b15156200011457600080fd5b60016002600087868151811015156200012957fe5b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff19169115159190911790556001929092019162000095565b84516200017d9060039060208801906200026c565b50505060049190915550506006555060009250505b845182101562000260578482815181101515620001ab57fe5b602090810290910101519050600160a060020a03811615156200022f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e56414c49445f41535345545f50524f585900000000000000000000000000604482015290519081900360640190fd5b600160a060020a0381166000908152600860205260409020805460ff19166001908117909155919091019062000192565b50505050505062000300565b828054828255906000526020600020908101928215620002c4579160200282015b82811115620002c45782518254600160a060020a031916600160a060020a039091161782556020909201916001909101906200028d565b50620002d2929150620002d6565b5090565b620002fd91905b80821115620002d2578054600160a060020a0319168155600101620002dd565b90565b61215380620003106000396000f30060806040526004361061015e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025e7c2781146101a0578063173825d9146101e157806320ea8d861461020f5780632f54bf6e146102275780633411c81c146102695780633589b35c1461029a57806337bd78a0146102b257806354741525146102d95780635a1a66af146102f85780637065cb481461032b578063784547a7146103595780637ad28c511461037157806383250f79146103895780638b51d13f146103b75780639ace38c2146103cf578063a0e67e2b146104a4578063a8abe69a14610509578063b5dc40c31461052e578063b77bf60014610546578063ba51a6df1461055b578063c01a8c8414610573578063c64274741461058b578063d38f2d8214610601578063d74f8edd14610619578063dc8452cd1461062e578063e20056e614610643578063ee22610b14610677575b600034111561019e5760408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b3480156101ac57600080fd5b506101b860043561068f565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156101ed57600080fd5b5061019e73ffffffffffffffffffffffffffffffffffffffff600435166106c4565b34801561021b57600080fd5b5061019e60043561091b565b34801561023357600080fd5b5061025573ffffffffffffffffffffffffffffffffffffffff600435166109f3565b604080519115158252519081900360200190f35b34801561027557600080fd5b5061025560043573ffffffffffffffffffffffffffffffffffffffff60243516610a08565b3480156102a657600080fd5b5061019e600435610a28565b3480156102be57600080fd5b506102c7610eda565b60408051918252519081900360200190f35b3480156102e557600080fd5b506102c760043515156024351515610ee0565b34801561030457600080fd5b5061019e73ffffffffffffffffffffffffffffffffffffffff600435166024351515610f4c565b34801561033757600080fd5b5061019e73ffffffffffffffffffffffffffffffffffffffff6004351661100b565b34801561036557600080fd5b50610255600435611180565b34801561037d57600080fd5b5061019e600435611211565b34801561039557600080fd5b5061025573ffffffffffffffffffffffffffffffffffffffff60043516611258565b3480156103c357600080fd5b506102c760043561126d565b3480156103db57600080fd5b506103e76004356112e9565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b8381101561046657818101518382015260200161044e565b50505050905090810190601f1680156104935780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b3480156104b057600080fd5b506104b96113d2565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104f55781810151838201526020016104dd565b505050509050019250505060405180910390f35b34801561051557600080fd5b506104b960043560243560443515156064351515611442565b34801561053a57600080fd5b506104b960043561157b565b34801561055257600080fd5b506102c7611728565b34801561056757600080fd5b5061019e60043561172e565b34801561057f57600080fd5b5061019e6004356117ad565b34801561059757600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102c794823573ffffffffffffffffffffffffffffffffffffffff169460248035953695946064949201919081908401838280828437509497506119219650505050505050565b34801561060d57600080fd5b506102c7600435611940565b34801561062557600080fd5b506102c7611952565b34801561063a57600080fd5b506102c7611957565b34801561064f57600080fd5b5061019e73ffffffffffffffffffffffffffffffffffffffff6004358116906024351661195d565b34801561068357600080fd5b5061019e600435611b6d565b600380548290811061069d57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60003330146106d257600080fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902054829060ff16151561070857600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905591505b6003547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0182101561088b578273ffffffffffffffffffffffffffffffffffffffff166003838154811015156107a857fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561088057600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061080057fe5b6000918252602090912001546003805473ffffffffffffffffffffffffffffffffffffffff909216918490811061083357fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061088b565b600190910190610756565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906108bc9082612066565b5060035460045411156108d5576003546108d59061172e565b60405173ffffffffffffffffffffffffffffffffffffffff8416907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a2505050565b3360008181526002602052604090205460ff16151561093957600080fd5b60008281526001602090815260408083203380855292529091205483919060ff16151561096557600080fd5b600084815260208190526040902060030154849060ff161561098657600080fd5b600085815260016020908152604080832033808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b600081815260208190526040812060030154829060ff1615610a4957600080fd5b82610a5381611180565b1515610ac057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f54585f4e4f545f46554c4c595f434f4e4649524d454400000000000000000000604482015290519081900360640190fd5b600084815260208181526040808320805473ffffffffffffffffffffffffffffffffffffffff16845260089092529091205485919060ff161515610b6557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f554e524547495354455245445f41535345545f50524f58590000000000000000604482015290519081900360640190fd5b604080517f72656d6f7665417574686f72697a6564416464726573734174496e646578286181527f6464726573732c75696e74323536290000000000000000000000000000000000602080830191909152825191829003602f01822060028086018054601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010060018416150201909116929092049182018490048402850184019095528084527fffffffff0000000000000000000000000000000000000000000000000000000090911693610ca193600093909290830182828015610c8e5780601f10610c6357610100808354040283529160200191610c8e565b820191906000526020600020905b815481529060010190602001808311610c7157829003601f168201915b5050505050611dfd90919063ffffffff16565b7fffffffff000000000000000000000000000000000000000000000000000000001614610d2f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f494e56414c49445f46554e4354494f4e5f53454c4543544f5200000000000000604482015290519081900360640190fd5b600086815260208181526040918290206003810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815481830154600280850180548851601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff97831615610100029790970190911692909204948501879004870282018701909752838152939a50610e479573ffffffffffffffffffffffffffffffffffffffff90921694909391908390830182828015610e3d5780601f10610e1257610100808354040283529160200191610e3d565b820191906000526020600020905b815481529060010190602001808311610e2057829003601f168201915b5050505050611ec5565b15610e7c5760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2610ed2565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a26003850180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b505050505050565b60065481565b6000805b600554811015610f4557838015610f0d575060008181526020819052604090206003015460ff16155b80610f315750828015610f31575060008181526020819052604090206003015460ff165b15610f3d576001820191505b600101610ee4565b5092915050565b333014610f5857600080fd5b8173ffffffffffffffffffffffffffffffffffffffff81161515610f7b57600080fd5b73ffffffffffffffffffffffffffffffffffffffff831660008181526008602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915582519384529083015280517fdaef8ff7dc66c5e34eb9c338aab679d9f427f89868d9228494455a4d982eb2b09281900390910190a1505050565b33301461101757600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040902054819060ff161561104c57600080fd5b8173ffffffffffffffffffffffffffffffffffffffff8116151561106f57600080fd5b6003805490506001016004546032821115801561108c5750818111155b801561109757508015155b80156110a257508115155b15156110ad57600080fd5b73ffffffffffffffffffffffffffffffffffffffff851660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b60035481101561120a57600084815260016020526040812060038054919291849081106111ae57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff16156111ef576001820191505b600454821415611202576001925061120a565b600101611185565b5050919050565b33301461121d57600080fd5b60068190556040805182815290517fd1c9101a34feff75cccef14a28785a0279cb0b49c1f321f21f5f422e746b43779181900360200190a150565b60086020526000908152604090205460ff1681565b6000805b6003548110156112e3576000838152600160205260408120600380549192918490811061129a57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff16156112db576001820191505b600101611271565b50919050565b60006020818152918152604090819020805460018083015460028085018054875161010095821615959095027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff011691909104601f810188900488028401880190965285835273ffffffffffffffffffffffffffffffffffffffff909316959094919291908301828280156113bf5780601f10611394576101008083540402835291602001916113bf565b820191906000526020600020905b8154815290600101906020018083116113a257829003601f168201915b5050506003909301549192505060ff1684565b6060600380548060200260200160405190810160405280929190818152602001828054801561143757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161140c575b505050505090505b90565b606080600080600554604051908082528060200260200182016040528015611474578160200160208202803883390190505b50925060009150600090505b6005548110156114fb578580156114a9575060008181526020819052604090206003015460ff16155b806114cd57508480156114cd575060008181526020819052604090206003015460ff165b156114f3578083838151811015156114e157fe5b60209081029091010152600191909101905b600101611480565b878703604051908082528060200260200182016040528015611527578160200160208202803883390190505b5093508790505b8681101561157057828181518110151561154457fe5b906020019060200201518489830381518110151561155e57fe5b6020908102909101015260010161152e565b505050949350505050565b6060806000806003805490506040519080825280602002602001820160405280156115b0578160200160208202803883390190505b50925060009150600090505b60035481101561169457600085815260016020526040812060038054919291849081106115e557fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff161561168c57600380548290811061162d57fe5b600091825260209091200154835173ffffffffffffffffffffffffffffffffffffffff9091169084908490811061166057fe5b73ffffffffffffffffffffffffffffffffffffffff909216602092830290910190910152600191909101905b6001016115bc565b816040519080825280602002602001820160405280156116be578160200160208202803883390190505b509350600090505b818110156117205782818151811015156116dc57fe5b9060200190602002015184828151811015156116f457fe5b73ffffffffffffffffffffffffffffffffffffffff9092166020928302909101909101526001016116c6565b505050919050565b60055481565b33301461173a57600080fd5b600354816032821180159061174f5750818111155b801561175a57508015155b801561176557508115155b151561177057600080fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b3360008181526002602052604090205460ff1615156117cb57600080fd5b600082815260208190526040902054829073ffffffffffffffffffffffffffffffffffffffff1615156117fd57600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561182857600080fd5b8461183281611180565b1561189e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f54585f46554c4c595f434f4e4649524d45440000000000000000000000000000604482015290519081900360640190fd5b600086815260016020818152604080842033808652925280842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909317909255905188927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a361191286611180565b15610ed257610ed28642611ee8565b600061192e848484611f33565b9050611939816117ad565b9392505050565b60076020526000908152604090205481565b603281565b60045481565b600033301461196b57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040902054839060ff1615156119a157600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040902054839060ff16156119d657600080fd5b600092505b600354831015611a9b578473ffffffffffffffffffffffffffffffffffffffff16600384815481101515611a0b57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161415611a905783600384815481101515611a4357fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611a9b565b6001909201916119db565b73ffffffffffffffffffffffffffffffffffffffff80861660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090811690915593881682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a260405173ffffffffffffffffffffffffffffffffffffffff8516907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a25050505050565b600081815260208190526040812060030154829060ff1615611b8e57600080fd5b82611b9881611180565b1515611c0557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f54585f4e4f545f46554c4c595f434f4e4649524d454400000000000000000000604482015290519081900360640190fd5b600654600085815260076020526040902054859101421015611c8857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f54494d455f4c4f434b5f494e434f4d504c455445000000000000000000000000604482015290519081900360640190fd5b600085815260208181526040918290206003810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815481830154600280850180548851601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff97831615610100029790970190911692909204948501879004870282018701909752838152939950611d6b9573ffffffffffffffffffffffffffffffffffffffff90921694909391908390830182828015610e3d5780601f10610e1257610100808354040283529160200191610e3d565b15611da05760405185907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611df6565b60405185907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a26003840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b5050505050565b600081600401835110151515611e9a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f475245415445525f4f525f455155414c5f544f5f345f4c454e4754485f52455160448201527f5549524544000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b5001602001517fffffffff000000000000000000000000000000000000000000000000000000001690565b6000806040516020840160008287838a8c6187965a03f198975050505050505050565b6000828152600760209081526040918290208390558151838152915184927f0b237afe65f1514fd7ea3f923ea4fe792bdd07000a912b6cd1602a8e7f573c8d92908290030190a25050565b60008373ffffffffffffffffffffffffffffffffffffffff81161515611f5857600080fd5b6005546040805160808101825273ffffffffffffffffffffffffffffffffffffffff8881168252602080830189815283850189815260006060860181905287815280845295909520845181547fffffffffffffffffffffffff00000000000000000000000000000000000000001694169390931783555160018301559251805194965091939092611ff092600285019291019061208f565b5060609190910151600390910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b81548183558181111561208a5760008381526020902061208a91810190830161210d565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106120d057805160ff19168380011785556120fd565b828001600101855582156120fd579182015b828111156120fd5782518255916020019190600101906120e2565b5061210992915061210d565b5090565b61143f91905b8082111561210957600081556001016121135600a165627a7a72305820528db33b34dd3d87f92765da5fac3e1e5d1b9239353f6405405ca9bfc9cee8db0029" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/artifacts/DummyERC20Token.json b/packages/contract-artifacts/artifacts/DummyERC20Token.json deleted file mode 100644 index 7b8e7c3a8..000000000 --- a/packages/contract-artifacts/artifacts/DummyERC20Token.json +++ /dev/null @@ -1,328 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "DummyERC20Token", - "compilerOutput": { - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "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, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_value", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_target", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "setBalance", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_MINT_AMOUNT", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "name": "_name", - "type": "string" - }, - { - "name": "_symbol", - "type": "string" - }, - { - "name": "_decimals", - "type": "uint256" - }, - { - "name": "_totalSupply", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "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" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": - "0x608060405234801561001057600080fd5b5060405162000fa438038062000fa4833981016040908152815160208084015192840151606085015160008054600160a060020a031916331790559285018051909594909401939092916100699160049187019061009c565b50825161007d90600590602086019061009c565b5060069190915533600090815260016020526040902055506101379050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100dd57805160ff191683800117855561010a565b8280016001018555821561010a579182015b8281111561010a5782518255916020019190600101906100ef565b5061011692915061011a565b5090565b61013491905b808211156101165760008155600101610120565b90565b610e5d80620001476000396000f3006080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100d4578063095ea7b31461015e57806318160ddd146101a357806323b872dd146101ca578063313ce5671461020157806370a08231146102165780638da5cb5b1461024457806395d89b4114610282578063a0712d6814610297578063a9059cbb146102b1578063dd62ed3e146102e2578063e30443bc14610316578063f2fde38b14610347578063fa9b701814610375575b600080fd5b3480156100e057600080fd5b506100e961038a565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012357818101518382015260200161010b565b50505050905090810190601f1680156101505780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016a57600080fd5b5061018f73ffffffffffffffffffffffffffffffffffffffff60043516602435610436565b604080519115158252519081900360200190f35b3480156101af57600080fd5b506101b86104a9565b60408051918252519081900360200190f35b3480156101d657600080fd5b5061018f73ffffffffffffffffffffffffffffffffffffffff600435811690602435166044356104af565b34801561020d57600080fd5b506101b861076b565b34801561022257600080fd5b506101b873ffffffffffffffffffffffffffffffffffffffff60043516610771565b34801561025057600080fd5b50610259610799565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561028e57600080fd5b506100e96107b5565b3480156102a357600080fd5b506102af60043561082e565b005b3480156102bd57600080fd5b5061018f73ffffffffffffffffffffffffffffffffffffffff600435166024356108b4565b3480156102ee57600080fd5b506101b873ffffffffffffffffffffffffffffffffffffffff60043581169060243516610a43565b34801561032257600080fd5b506102af73ffffffffffffffffffffffffffffffffffffffff60043516602435610a7b565b34801561035357600080fd5b506102af73ffffffffffffffffffffffffffffffffffffffff60043516610b91565b34801561038157600080fd5b506101b8610c78565b6004805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f8101849004840282018401909252818152929183018282801561042e5780601f106104035761010080835404028352916020019161042e565b820191906000526020600020905b81548152906001019060200180831161041157829003601f168201915b505050505081565b33600081815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60035490565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600260209081526040808320338452825280832054938352600190915281205490919083111561055c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45524332305f494e53554646494349454e545f42414c414e4345000000000000604482015290519081900360640190fd5b828110156105cb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45524332305f494e53554646494349454e545f414c4c4f57414e434500000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260016020526040902054838101101561066157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff808516600090815260016020526040808220805487019055918716815220805484900390557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156106fb5773ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083203384529091529020805484900390555b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3506001949350505050565b60065481565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6005805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f8101849004840282018401909252818152929183018282801561042e5780601f106104035761010080835404028352916020019161042e565b69021e19e0c9bab24000008111156108a757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f56414c55455f544f4f5f4c415247450000000000000000000000000000000000604482015290519081900360640190fd5b6108b13382610c86565b50565b3360009081526001602052604081205482111561093257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45524332305f494e53554646494349454e545f42414c414e4345000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205482810110156109c857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b3360008181526001602090815260408083208054879003905573ffffffffffffffffffffffffffffffffffffffff871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b6000805473ffffffffffffffffffffffffffffffffffffffff163314610b0257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b5073ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205480821015610b4e57610b46600354610b418385610d3f565b610d3f565b600355610b67565b610b63600354610b5e8484610d3f565b610db6565b6003555b5073ffffffffffffffffffffffffffffffffffffffff909116600090815260016020526040902055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c1757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116156108b1576000805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff000000000000000000000000000000000000000090911617905550565b69021e19e0c9bab240000081565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054610cb7908290610db6565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902055600354610cea9082610db6565b60035560408051828152905173ffffffffffffffffffffffffffffffffffffffff8416916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600082821115610db057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f55494e543235365f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b50900390565b600082820183811015610e2a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b93925050505600a165627a7a72305820bf15f8b157047a3248e2c7bf50ad7dd5d360d0bb36a780e3bad9229fc4bad5d20029" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/artifacts/DummyERC721Token.json b/packages/contract-artifacts/artifacts/DummyERC721Token.json deleted file mode 100644 index 7472a5a03..000000000 --- a/packages/contract-artifacts/artifacts/DummyERC721Token.json +++ /dev/null @@ -1,375 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "DummyERC721Token", - "compilerOutput": { - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_approved", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_operator", - "type": "address" - }, - { - "name": "_approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - }, - { - "name": "_data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "name": "_name", - "type": "string" - }, - { - "name": "_symbol", - "type": "string" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_from", - "type": "address" - }, - { - "indexed": true, - "name": "_to", - "type": "address" - }, - { - "indexed": true, - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_approved", - "type": "address" - }, - { - "indexed": true, - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_operator", - "type": "address" - }, - { - "indexed": false, - "name": "_approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": - "0x60806040523480156200001157600080fd5b506040516200175e3803806200175e83398101604052805160208083015160008054600160a060020a031916331790559183018051909392909201916200005f91600591908501906200007e565b508051620000759060069060208401906200007e565b50505062000123565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620000c157805160ff1916838001178555620000f1565b82800160010185558215620000f1579182015b82811115620000f1578251825591602001919060010190620000d4565b50620000ff92915062000103565b5090565b6200012091905b80821115620000ff57600081556001016200010a565b90565b61162b80620001336000396000f3006080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100df578063081812fc14610169578063095ea7b3146101aa57806323b872dd146101dd57806340c10f191461021457806342842e0e146102455780636352211e1461027c57806370a08231146102945780638da5cb5b146102d457806395d89b41146102e95780639dc29fac146102fe578063a22cb4651461032f578063b88d4fde14610362578063e985e9c5146103a8578063f2fde38b146103f0575b600080fd5b3480156100eb57600080fd5b506100f461041e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012e578181015183820152602001610116565b50505050905090810190601f16801561015b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017557600080fd5b506101816004356104ca565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156101b657600080fd5b506101db73ffffffffffffffffffffffffffffffffffffffff600435166024356104f2565b005b3480156101e957600080fd5b506101db73ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610616565b34801561022057600080fd5b506101db73ffffffffffffffffffffffffffffffffffffffff60043516602435610977565b34801561025157600080fd5b506101db73ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610985565b34801561028857600080fd5b50610181600435610b50565b3480156102a057600080fd5b506102c273ffffffffffffffffffffffffffffffffffffffff60043516610be9565b60408051918252519081900360200190f35b3480156102e057600080fd5b50610181610c98565b3480156102f557600080fd5b506100f4610cb4565b34801561030a57600080fd5b506101db73ffffffffffffffffffffffffffffffffffffffff60043516602435610d2d565b34801561033b57600080fd5b506101db73ffffffffffffffffffffffffffffffffffffffff600435166024351515610dbd565b34801561036e57600080fd5b506101db73ffffffffffffffffffffffffffffffffffffffff60048035821691602480359091169160443591606435908101910135610e56565b3480156103b457600080fd5b506103dc73ffffffffffffffffffffffffffffffffffffffff6004358116906024351661103a565b604080519115158252519081900360200190f35b3480156103fc57600080fd5b506101db73ffffffffffffffffffffffffffffffffffffffff60043516611075565b6005805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156104c25780601f10610497576101008083540402835291602001916104c2565b820191906000526020600020905b8154815290600101906020018083116104a557829003601f168201915b505050505081565b60009081526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60006104fd82610b50565b90503373ffffffffffffffffffffffffffffffffffffffff821614806105285750610528813361103a565b151561059557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f494e56414c49445f53454e4445520000000000000000000000604482015290519081900360640190fd5b60008281526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000808073ffffffffffffffffffffffffffffffffffffffff8516151561069e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f5a45524f5f544f5f4144445245535300000000000000000000604482015290519081900360640190fd5b6106a784610b50565b925073ffffffffffffffffffffffffffffffffffffffff8681169084161461073057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f4f574e45525f4d49534d415443480000000000000000000000604482015290519081900360640190fd5b33915061073c846104ca565b90508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148061077d575061077d838361103a565b806107b357508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b151561082057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f494e56414c49445f5350454e44455200000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81161561087157600084815260026020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b600084815260016020818152604080842080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8b8116919091179091558a1684526003909152909120546108db9161115b565b73ffffffffffffffffffffffffffffffffffffffff80881660009081526003602052604080822093909355908716815220546109189060016111d2565b73ffffffffffffffffffffffffffffffffffffffff808716600081815260036020526040808220949094559251879391928a16917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050505050565b610981828261124d565b5050565b600080610993858585610616565b833b91506000821115610b4957604080517f150b7a0200000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8781166024830152604482018690526080606483015260006084830181905292519087169263150b7a029260c480820193602093909283900390910190829087803b158015610a3057600080fd5b505af1158015610a44573d6000803e3d6000fd5b505050506040513d6020811015610a5a57600080fd5b5051604080517f6f6e455243373231526563656976656428616464726573732c6164647265737381527f2c75696e743235362c62797465732900000000000000000000000000000000006020820152905190819003602f0190209091507fffffffff00000000000000000000000000000000000000000000000000000000808316911614610b4957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4552433732315f494e56414c49445f53454c4543544f52000000000000000000604482015290519081900360640190fd5b5050505050565b60008181526001602052604081205473ffffffffffffffffffffffffffffffffffffffff16801515610be357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4552433732315f5a45524f5f4f574e4552000000000000000000000000000000604482015290519081900360640190fd5b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82161515610c6f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4552433732315f5a45524f5f4f574e4552000000000000000000000000000000604482015290519081900360640190fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6006805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156104c25780601f10610497576101008083540402835291602001916104c2565b60005473ffffffffffffffffffffffffffffffffffffffff163314610db357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b6109818282611425565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b600080610e64878787610616565b853b91506000821115611031576040517f150b7a02000000000000000000000000000000000000000000000000000000008152336004820181815273ffffffffffffffffffffffffffffffffffffffff8a811660248501526044840189905260806064850190815260848501889052908a169363150b7a0293928c928b928b928b92909160a40184848082843782019150509650505050505050602060405180830381600087803b158015610f1857600080fd5b505af1158015610f2c573d6000803e3d6000fd5b505050506040513d6020811015610f4257600080fd5b5051604080517f6f6e455243373231526563656976656428616464726573732c6164647265737381527f2c75696e743235362c62797465732900000000000000000000000000000000006020820152905190819003602f0190209091507fffffffff0000000000000000000000000000000000000000000000000000000080831691161461103157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4552433732315f494e56414c49445f53454c4543544f52000000000000000000604482015290519081900360640190fd5b50505050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260046020908152604080832093909416825291909152205460ff1690565b60005473ffffffffffffffffffffffffffffffffffffffff1633146110fb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81161561115857600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b6000828211156111cc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f55494e543235365f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b50900390565b60008282018381101561124657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b9392505050565b600073ffffffffffffffffffffffffffffffffffffffff831615156112d357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f5a45524f5f544f5f4144445245535300000000000000000000604482015290519081900360640190fd5b5060008181526001602052604090205473ffffffffffffffffffffffffffffffffffffffff16801561136657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4552433732315f4f574e45525f414c52454144595f4558495354530000000000604482015290519081900360640190fd5b600082815260016020818152604080842080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff891690811790915584526003909152909120546113cc916111d2565b73ffffffffffffffffffffffffffffffffffffffff84166000818152600360205260408082209390935591518492907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4505050565b600073ffffffffffffffffffffffffffffffffffffffff831615156114ab57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732315f5a45524f5f4f574e45525f4144445245535300000000000000604482015290519081900360640190fd5b5060008181526001602052604090205473ffffffffffffffffffffffffffffffffffffffff908116908316811461154357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f4f574e45525f4d49534d415443480000000000000000000000604482015290519081900360640190fd5b600082815260016020818152604080842080547fffffffffffffffffffffffff000000000000000000000000000000000000000016905573ffffffffffffffffffffffffffffffffffffffff871684526003909152909120546115a59161115b565b73ffffffffffffffffffffffffffffffffffffffff8416600081815260036020526040808220939093559151849291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050505600a165627a7a72305820b4f0e9923df681b39c750c35907b3b53e3d18d5d27a56215be103c035936a9e00029" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/artifacts/DutchAuction.json b/packages/contract-artifacts/artifacts/DutchAuction.json deleted file mode 100644 index 3c1cb8c4c..000000000 --- a/packages/contract-artifacts/artifacts/DutchAuction.json +++ /dev/null @@ -1,310 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "DutchAuction", - "compilerOutput": { - "abi": [ - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "order", - "type": "tuple" - } - ], - "name": "getAuctionDetails", - "outputs": [ - { - "components": [ - { - "name": "beginTimeSeconds", - "type": "uint256" - }, - { - "name": "endTimeSeconds", - "type": "uint256" - }, - { - "name": "beginAmount", - "type": "uint256" - }, - { - "name": "endAmount", - "type": "uint256" - }, - { - "name": "currentAmount", - "type": "uint256" - }, - { - "name": "currentTimeSeconds", - "type": "uint256" - } - ], - "name": "auctionDetails", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "buyOrder", - "type": "tuple" - }, - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "sellOrder", - "type": "tuple" - }, - { - "name": "buySignature", - "type": "bytes" - }, - { - "name": "sellSignature", - "type": "bytes" - } - ], - "name": "matchOrders", - "outputs": [ - { - "components": [ - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "left", - "type": "tuple" - }, - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "right", - "type": "tuple" - }, - { - "name": "leftMakerAssetSpreadAmount", - "type": "uint256" - } - ], - "name": "matchedFillResults", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "name": "_exchange", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "0x608060405234801561001057600080fd5b50604051602080611352833981018060405261002f9190810190610067565b60008054600160a060020a031916600160a060020a0392909216919091179055610099565b6000610060825161008d565b9392505050565b60006020828403121561007957600080fd5b60006100858484610054565b949350505050565b600160a060020a031690565b6112aa806100a86000396000f30060806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632e9cd03381146100505780633c28d86114610086575b600080fd5b34801561005c57600080fd5b5061007061006b366004610b25565b6100b3565b60405161007d919061110a565b60405180910390f35b34801561009257600080fd5b506100a66100a1366004610b5a565b61029c565b60405161007d9190611118565b6100bb6107b1565b610140820151516000808080808080606488101561010e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110aa565b60405180910390fd5b6101408a0151610146907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08a0163ffffffff6105f216565b6101408b0151909750610181907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08a0163ffffffff6105f216565b9550868a61010001511115156101c3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110ba565b868a61010001510394508960a001519350838611151561020f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110fa565b50505083865261010087018051602088015260408701849052606087018290524260a088018190529051828503919081900386821015610255576080890186905261028f565b6101008a0151821061026d576080890184905261028f565b6102898461028461027e8487610607565b8861066d565b610684565b60808a01525b5050505050505050919050565b6102a46107e8565b6102ac6107b1565b6000606060008060006102be8a6100b3565b805160a08201519197501115610300576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110ea565b60a08601516101008b015111610342576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110ca565b608080870151908c01511015610384576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110fa565b6000546040517f3c28d86100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690633c28d861906103e0908e908e908e908e90600401611127565b61012060405180830381600087803b1580156103fb57600080fd5b505af115801561040f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506104339190810190610b06565b96508660400151945060008511156105e4576101608a0151935061045e84601063ffffffff6106c316565b92506104728b608001518760800151610724565b915061047e8583610724565b905060008111156105325789516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169163a9059cbb916104de9190859060040161105f565b602060405180830381600087803b1580156104f857600080fd5b505af115801561050c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105309190810190610ae0565b505b60008211156105e4578a516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169163a9059cbb916105909190869060040161105f565b602060405180830381600087803b1580156105aa57600080fd5b505af11580156105be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105e29190810190610ae0565b505b505050505050949350505050565b60006105fe8383610766565b90505b92915050565b60008083151561061a5760009150610666565b5082820282848281151561062a57fe5b0414610662576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101059061109a565b8091505b5092915050565b600080828481151561067b57fe5b04949350505050565b600082820183811015610662576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101059061109a565b600081601401835110151515610705576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110da565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b600082821115610760576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101059061107a565b50900390565b6000816020018351101515156107a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101059061108a565b50016020015190565b60c0604051908101604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b610120604051908101604052806107fd610817565b815260200161080a610817565b8152602001600081525090565b608060405190810160405280600081526020016000815260200160008152602001600081525090565b600061084c82356111ef565b9392505050565b600061084c825161120b565b6000601f8201831361087057600080fd5b813561088361087e826111a5565b61117e565b9150808252602083016020830185838301111561089f57600080fd5b6108aa838284611210565b50505092915050565b6000608082840312156108c557600080fd5b6108cf608061117e565b905060006108dd8484610ad4565b82525060206108ee84848301610ad4565b602083015250604061090284828501610ad4565b604083015250606061091684828501610ad4565b60608301525092915050565b6000610120828403121561093557600080fd5b61093f606061117e565b9050600061094d84846108b3565b825250608061095e848483016108b3565b60208301525061010061097384828501610ad4565b60408301525092915050565b6000610180828403121561099257600080fd5b61099d61018061117e565b905060006109ab8484610840565b82525060206109bc84848301610840565b60208301525060406109d084828501610840565b60408301525060606109e484828501610840565b60608301525060806109f884828501610ac8565b60808301525060a0610a0c84828501610ac8565b60a08301525060c0610a2084828501610ac8565b60c08301525060e0610a3484828501610ac8565b60e083015250610100610a4984828501610ac8565b61010083015250610120610a5f84828501610ac8565b6101208301525061014082013567ffffffffffffffff811115610a8157600080fd5b610a8d8482850161085f565b6101408301525061016082013567ffffffffffffffff811115610aaf57600080fd5b610abb8482850161085f565b6101608301525092915050565b600061084c8235611208565b600061084c8251611208565b600060208284031215610af257600080fd5b6000610afe8484610853565b949350505050565b60006101208284031215610b1957600080fd5b6000610afe8484610922565b600060208284031215610b3757600080fd5b813567ffffffffffffffff811115610b4e57600080fd5b610afe8482850161097f565b60008060008060808587031215610b7057600080fd5b843567ffffffffffffffff811115610b8757600080fd5b610b938782880161097f565b945050602085013567ffffffffffffffff811115610bb057600080fd5b610bbc8782880161097f565b935050604085013567ffffffffffffffff811115610bd957600080fd5b610be58782880161085f565b925050606085013567ffffffffffffffff811115610c0257600080fd5b610c0e8782880161085f565b91505092959194509250565b610c23816111ef565b82525050565b6000610c34826111eb565b808452610c4881602086016020860161121c565b610c5181611248565b9093016020019392505050565b601181527f55494e543235365f554e444552464c4f57000000000000000000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601081527f55494e543235365f4f564552464c4f5700000000000000000000000000000000602082015260400190565b601281527f494e56414c49445f41535345545f444154410000000000000000000000000000602082015260400190565b601281527f494e56414c49445f424547494e5f54494d450000000000000000000000000000602082015260400190565b600f81527f41554354494f4e5f455850495245440000000000000000000000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f32305f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601381527f41554354494f4e5f4e4f545f5354415254454400000000000000000000000000602082015260400190565b600e81527f494e56414c49445f414d4f554e54000000000000000000000000000000000000602082015260400190565b805160c0830190610e6b8482611056565b506020820151610e7e6020850182611056565b506040820151610e916040850182611056565b506060820151610ea46060850182611056565b506080820151610eb76080850182611056565b5060a0820151610eca60a0850182611056565b50505050565b80516080830190610ee18482611056565b506020820151610ef46020850182611056565b506040820151610f076040850182611056565b506060820151610eca6060850182611056565b8051610120830190610f2c8482610ed0565b506020820151610f3f6080850182610ed0565b506040820151610eca610100850182611056565b8051600090610180840190610f688582610c1a565b506020830151610f7b6020860182610c1a565b506040830151610f8e6040860182610c1a565b506060830151610fa16060860182610c1a565b506080830151610fb46080860182611056565b5060a0830151610fc760a0860182611056565b5060c0830151610fda60c0860182611056565b5060e0830151610fed60e0860182611056565b50610100830151611002610100860182611056565b50610120830151611017610120860182611056565b506101408301518482036101408601526110318282610c29565b91505061016083015184820361016086015261104d8282610c29565b95945050505050565b610c2381611208565b6040810161106d8285610c1a565b61084c6020830184611056565b6020808252810161060181610c5e565b6020808252810161060181610c8e565b6020808252810161060181610ce4565b6020808252810161060181610d14565b6020808252810161060181610d44565b6020808252810161060181610d74565b6020808252810161060181610da4565b6020808252810161060181610dfa565b6020808252810161060181610e2a565b60c081016106018284610e5a565b61012081016106018284610f1a565b608080825281016111388187610f53565b9050818103602083015261114c8186610f53565b905081810360408301526111608185610c29565b905081810360608301526111748184610c29565b9695505050505050565b60405181810167ffffffffffffffff8111828210171561119d57600080fd5b604052919050565b600067ffffffffffffffff8211156111bc57600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b5190565b73ffffffffffffffffffffffffffffffffffffffff1690565b90565b151590565b82818337506000910152565b60005b8381101561123757818101518382015260200161121f565b83811115610eca5750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905600a265627a7a723058209cf70b04b75fc23e6762ae4c6c8f25ccad25dfcb39cf1dd3966eb27ce513de036c6578706572696d656e74616cf50037", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP1 PUSH2 0x1352 DUP4 CODECOPY DUP2 ADD DUP1 PUSH1 0x40 MSTORE PUSH2 0x2F SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x67 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE PUSH2 0x99 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x60 DUP3 MLOAD PUSH2 0x8D JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x79 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x85 DUP5 DUP5 PUSH2 0x54 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP1 JUMP JUMPDEST PUSH2 0x12AA DUP1 PUSH2 0xA8 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x4B JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x2E9CD033 DUP2 EQ PUSH2 0x50 JUMPI DUP1 PUSH4 0x3C28D861 EQ PUSH2 0x86 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x70 PUSH2 0x6B CALLDATASIZE PUSH1 0x4 PUSH2 0xB25 JUMP JUMPDEST PUSH2 0xB3 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x7D SWAP2 SWAP1 PUSH2 0x110A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x92 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xA6 PUSH2 0xA1 CALLDATASIZE PUSH1 0x4 PUSH2 0xB5A JUMP JUMPDEST PUSH2 0x29C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x7D SWAP2 SWAP1 PUSH2 0x1118 JUMP JUMPDEST PUSH2 0xBB PUSH2 0x7B1 JUMP JUMPDEST PUSH2 0x140 DUP3 ADD MLOAD MLOAD PUSH1 0x0 DUP1 DUP1 DUP1 DUP1 DUP1 DUP1 PUSH1 0x64 DUP9 LT ISZERO PUSH2 0x10E JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x10AA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x140 DUP11 ADD MLOAD PUSH2 0x146 SWAP1 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0 DUP11 ADD PUSH4 0xFFFFFFFF PUSH2 0x5F2 AND JUMP JUMPDEST PUSH2 0x140 DUP12 ADD MLOAD SWAP1 SWAP8 POP PUSH2 0x181 SWAP1 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP11 ADD PUSH4 0xFFFFFFFF PUSH2 0x5F2 AND JUMP JUMPDEST SWAP6 POP DUP7 DUP11 PUSH2 0x100 ADD MLOAD GT ISZERO ISZERO PUSH2 0x1C3 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x10BA JUMP JUMPDEST DUP7 DUP11 PUSH2 0x100 ADD MLOAD SUB SWAP5 POP DUP10 PUSH1 0xA0 ADD MLOAD SWAP4 POP DUP4 DUP7 GT ISZERO ISZERO PUSH2 0x20F JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x10FA JUMP JUMPDEST POP POP POP DUP4 DUP7 MSTORE PUSH2 0x100 DUP8 ADD DUP1 MLOAD PUSH1 0x20 DUP9 ADD MSTORE PUSH1 0x40 DUP8 ADD DUP5 SWAP1 MSTORE PUSH1 0x60 DUP8 ADD DUP3 SWAP1 MSTORE TIMESTAMP PUSH1 0xA0 DUP9 ADD DUP2 SWAP1 MSTORE SWAP1 MLOAD DUP3 DUP6 SUB SWAP2 SWAP1 DUP2 SWAP1 SUB DUP7 DUP3 LT ISZERO PUSH2 0x255 JUMPI PUSH1 0x80 DUP10 ADD DUP7 SWAP1 MSTORE PUSH2 0x28F JUMP JUMPDEST PUSH2 0x100 DUP11 ADD MLOAD DUP3 LT PUSH2 0x26D JUMPI PUSH1 0x80 DUP10 ADD DUP5 SWAP1 MSTORE PUSH2 0x28F JUMP JUMPDEST PUSH2 0x289 DUP5 PUSH2 0x284 PUSH2 0x27E DUP5 DUP8 PUSH2 0x607 JUMP JUMPDEST DUP9 PUSH2 0x66D JUMP JUMPDEST PUSH2 0x684 JUMP JUMPDEST PUSH1 0x80 DUP11 ADD MSTORE JUMPDEST POP POP POP POP POP POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x2A4 PUSH2 0x7E8 JUMP JUMPDEST PUSH2 0x2AC PUSH2 0x7B1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x2BE DUP11 PUSH2 0xB3 JUMP JUMPDEST DUP1 MLOAD PUSH1 0xA0 DUP3 ADD MLOAD SWAP2 SWAP8 POP GT ISZERO PUSH2 0x300 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x10EA JUMP JUMPDEST PUSH1 0xA0 DUP7 ADD MLOAD PUSH2 0x100 DUP12 ADD MLOAD GT PUSH2 0x342 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x10CA JUMP JUMPDEST PUSH1 0x80 DUP1 DUP8 ADD MLOAD SWAP1 DUP13 ADD MLOAD LT ISZERO PUSH2 0x384 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x10FA JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 MLOAD PUSH32 0x3C28D86100000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP2 AND SWAP1 PUSH4 0x3C28D861 SWAP1 PUSH2 0x3E0 SWAP1 DUP15 SWAP1 DUP15 SWAP1 DUP15 SWAP1 DUP15 SWAP1 PUSH1 0x4 ADD PUSH2 0x1127 JUMP JUMPDEST PUSH2 0x120 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x3FB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x40F JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP PUSH2 0x433 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0xB06 JUMP JUMPDEST SWAP7 POP DUP7 PUSH1 0x40 ADD MLOAD SWAP5 POP PUSH1 0x0 DUP6 GT ISZERO PUSH2 0x5E4 JUMPI PUSH2 0x160 DUP11 ADD MLOAD SWAP4 POP PUSH2 0x45E DUP5 PUSH1 0x10 PUSH4 0xFFFFFFFF PUSH2 0x6C3 AND JUMP JUMPDEST SWAP3 POP PUSH2 0x472 DUP12 PUSH1 0x80 ADD MLOAD DUP8 PUSH1 0x80 ADD MLOAD PUSH2 0x724 JUMP JUMPDEST SWAP2 POP PUSH2 0x47E DUP6 DUP4 PUSH2 0x724 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 GT ISZERO PUSH2 0x532 JUMPI DUP10 MLOAD PUSH1 0x40 MLOAD PUSH32 0xA9059CBB00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND SWAP2 PUSH4 0xA9059CBB SWAP2 PUSH2 0x4DE SWAP2 SWAP1 DUP6 SWAP1 PUSH1 0x4 ADD PUSH2 0x105F JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x4F8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x50C JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP PUSH2 0x530 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0xAE0 JUMP JUMPDEST POP JUMPDEST PUSH1 0x0 DUP3 GT ISZERO PUSH2 0x5E4 JUMPI DUP11 MLOAD PUSH1 0x40 MLOAD PUSH32 0xA9059CBB00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND SWAP2 PUSH4 0xA9059CBB SWAP2 PUSH2 0x590 SWAP2 SWAP1 DUP7 SWAP1 PUSH1 0x4 ADD PUSH2 0x105F JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x5AA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x5BE JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP PUSH2 0x5E2 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0xAE0 JUMP JUMPDEST POP JUMPDEST POP POP POP POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5FE DUP4 DUP4 PUSH2 0x766 JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 ISZERO ISZERO PUSH2 0x61A JUMPI PUSH1 0x0 SWAP2 POP PUSH2 0x666 JUMP JUMPDEST POP DUP3 DUP3 MUL DUP3 DUP5 DUP3 DUP2 ISZERO ISZERO PUSH2 0x62A JUMPI INVALID JUMPDEST DIV EQ PUSH2 0x662 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x109A JUMP JUMPDEST DUP1 SWAP2 POP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 DUP5 DUP2 ISZERO ISZERO PUSH2 0x67B JUMPI INVALID JUMPDEST DIV SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x662 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x109A JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x14 ADD DUP4 MLOAD LT ISZERO ISZERO ISZERO PUSH2 0x705 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x10DA JUMP JUMPDEST POP ADD PUSH1 0x14 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 GT ISZERO PUSH2 0x760 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x107A JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x20 ADD DUP4 MLOAD LT ISZERO ISZERO ISZERO PUSH2 0x7A8 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x108A JUMP JUMPDEST POP ADD PUSH1 0x20 ADD MLOAD SWAP1 JUMP JUMPDEST PUSH1 0xC0 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH2 0x120 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0x7FD PUSH2 0x817 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x80A PUSH2 0x817 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x80 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x84C DUP3 CALLDATALOAD PUSH2 0x11EF JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x84C DUP3 MLOAD PUSH2 0x120B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1F DUP3 ADD DUP4 SGT PUSH2 0x870 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x883 PUSH2 0x87E DUP3 PUSH2 0x11A5 JUMP JUMPDEST PUSH2 0x117E JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE PUSH1 0x20 DUP4 ADD PUSH1 0x20 DUP4 ADD DUP6 DUP4 DUP4 ADD GT ISZERO PUSH2 0x89F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x8AA DUP4 DUP3 DUP5 PUSH2 0x1210 JUMP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x8C5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x8CF PUSH1 0x80 PUSH2 0x117E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x8DD DUP5 DUP5 PUSH2 0xAD4 JUMP JUMPDEST DUP3 MSTORE POP PUSH1 0x20 PUSH2 0x8EE DUP5 DUP5 DUP4 ADD PUSH2 0xAD4 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD MSTORE POP PUSH1 0x40 PUSH2 0x902 DUP5 DUP3 DUP6 ADD PUSH2 0xAD4 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE POP PUSH1 0x60 PUSH2 0x916 DUP5 DUP3 DUP6 ADD PUSH2 0xAD4 JUMP JUMPDEST PUSH1 0x60 DUP4 ADD MSTORE POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x120 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x935 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x93F PUSH1 0x60 PUSH2 0x117E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x94D DUP5 DUP5 PUSH2 0x8B3 JUMP JUMPDEST DUP3 MSTORE POP PUSH1 0x80 PUSH2 0x95E DUP5 DUP5 DUP4 ADD PUSH2 0x8B3 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD MSTORE POP PUSH2 0x100 PUSH2 0x973 DUP5 DUP3 DUP6 ADD PUSH2 0xAD4 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x180 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x992 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x99D PUSH2 0x180 PUSH2 0x117E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x9AB DUP5 DUP5 PUSH2 0x840 JUMP JUMPDEST DUP3 MSTORE POP PUSH1 0x20 PUSH2 0x9BC DUP5 DUP5 DUP4 ADD PUSH2 0x840 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD MSTORE POP PUSH1 0x40 PUSH2 0x9D0 DUP5 DUP3 DUP6 ADD PUSH2 0x840 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE POP PUSH1 0x60 PUSH2 0x9E4 DUP5 DUP3 DUP6 ADD PUSH2 0x840 JUMP JUMPDEST PUSH1 0x60 DUP4 ADD MSTORE POP PUSH1 0x80 PUSH2 0x9F8 DUP5 DUP3 DUP6 ADD PUSH2 0xAC8 JUMP JUMPDEST PUSH1 0x80 DUP4 ADD MSTORE POP PUSH1 0xA0 PUSH2 0xA0C DUP5 DUP3 DUP6 ADD PUSH2 0xAC8 JUMP JUMPDEST PUSH1 0xA0 DUP4 ADD MSTORE POP PUSH1 0xC0 PUSH2 0xA20 DUP5 DUP3 DUP6 ADD PUSH2 0xAC8 JUMP JUMPDEST PUSH1 0xC0 DUP4 ADD MSTORE POP PUSH1 0xE0 PUSH2 0xA34 DUP5 DUP3 DUP6 ADD PUSH2 0xAC8 JUMP JUMPDEST PUSH1 0xE0 DUP4 ADD MSTORE POP PUSH2 0x100 PUSH2 0xA49 DUP5 DUP3 DUP6 ADD PUSH2 0xAC8 JUMP JUMPDEST PUSH2 0x100 DUP4 ADD MSTORE POP PUSH2 0x120 PUSH2 0xA5F DUP5 DUP3 DUP6 ADD PUSH2 0xAC8 JUMP JUMPDEST PUSH2 0x120 DUP4 ADD MSTORE POP PUSH2 0x140 DUP3 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xA81 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xA8D DUP5 DUP3 DUP6 ADD PUSH2 0x85F JUMP JUMPDEST PUSH2 0x140 DUP4 ADD MSTORE POP PUSH2 0x160 DUP3 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xAAF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xABB DUP5 DUP3 DUP6 ADD PUSH2 0x85F JUMP JUMPDEST PUSH2 0x160 DUP4 ADD MSTORE POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x84C DUP3 CALLDATALOAD PUSH2 0x1208 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x84C DUP3 MLOAD PUSH2 0x1208 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xAF2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0xAFE DUP5 DUP5 PUSH2 0x853 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x120 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB19 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0xAFE DUP5 DUP5 PUSH2 0x922 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xB4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xAFE DUP5 DUP3 DUP6 ADD PUSH2 0x97F JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xB70 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xB87 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xB93 DUP8 DUP3 DUP9 ADD PUSH2 0x97F JUMP JUMPDEST SWAP5 POP POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xBB0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xBBC DUP8 DUP3 DUP9 ADD PUSH2 0x97F JUMP JUMPDEST SWAP4 POP POP PUSH1 0x40 DUP6 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xBD9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xBE5 DUP8 DUP3 DUP9 ADD PUSH2 0x85F JUMP JUMPDEST SWAP3 POP POP PUSH1 0x60 DUP6 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xC02 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xC0E DUP8 DUP3 DUP9 ADD PUSH2 0x85F JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP2 SWAP5 POP SWAP3 POP JUMP JUMPDEST PUSH2 0xC23 DUP2 PUSH2 0x11EF JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xC34 DUP3 PUSH2 0x11EB JUMP JUMPDEST DUP1 DUP5 MSTORE PUSH2 0xC48 DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x121C JUMP JUMPDEST PUSH2 0xC51 DUP2 PUSH2 0x1248 JUMP JUMPDEST SWAP1 SWAP4 ADD PUSH1 0x20 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x11 DUP2 MSTORE PUSH32 0x55494E543235365F554E444552464C4F57000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x26 DUP2 MSTORE PUSH32 0x475245415445525F4F525F455155414C5F544F5F33325F4C454E4754485F5245 PUSH1 0x20 DUP3 ADD MSTORE PUSH32 0x5155495245440000000000000000000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x10 DUP2 MSTORE PUSH32 0x55494E543235365F4F564552464C4F5700000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x12 DUP2 MSTORE PUSH32 0x494E56414C49445F41535345545F444154410000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x12 DUP2 MSTORE PUSH32 0x494E56414C49445F424547494E5F54494D450000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0xF DUP2 MSTORE PUSH32 0x41554354494F4E5F455850495245440000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x26 DUP2 MSTORE PUSH32 0x475245415445525F4F525F455155414C5F544F5F32305F4C454E4754485F5245 PUSH1 0x20 DUP3 ADD MSTORE PUSH32 0x5155495245440000000000000000000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x13 DUP2 MSTORE PUSH32 0x41554354494F4E5F4E4F545F5354415254454400000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0xE DUP2 MSTORE PUSH32 0x494E56414C49445F414D4F554E54000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST DUP1 MLOAD PUSH1 0xC0 DUP4 ADD SWAP1 PUSH2 0xE6B DUP5 DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0x20 DUP3 ADD MLOAD PUSH2 0xE7E PUSH1 0x20 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0x40 DUP3 ADD MLOAD PUSH2 0xE91 PUSH1 0x40 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0x60 DUP3 ADD MLOAD PUSH2 0xEA4 PUSH1 0x60 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0x80 DUP3 ADD MLOAD PUSH2 0xEB7 PUSH1 0x80 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0xA0 DUP3 ADD MLOAD PUSH2 0xECA PUSH1 0xA0 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x80 DUP4 ADD SWAP1 PUSH2 0xEE1 DUP5 DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0x20 DUP3 ADD MLOAD PUSH2 0xEF4 PUSH1 0x20 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0x40 DUP3 ADD MLOAD PUSH2 0xF07 PUSH1 0x40 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0x60 DUP3 ADD MLOAD PUSH2 0xECA PUSH1 0x60 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST DUP1 MLOAD PUSH2 0x120 DUP4 ADD SWAP1 PUSH2 0xF2C DUP5 DUP3 PUSH2 0xED0 JUMP JUMPDEST POP PUSH1 0x20 DUP3 ADD MLOAD PUSH2 0xF3F PUSH1 0x80 DUP6 ADD DUP3 PUSH2 0xED0 JUMP JUMPDEST POP PUSH1 0x40 DUP3 ADD MLOAD PUSH2 0xECA PUSH2 0x100 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST DUP1 MLOAD PUSH1 0x0 SWAP1 PUSH2 0x180 DUP5 ADD SWAP1 PUSH2 0xF68 DUP6 DUP3 PUSH2 0xC1A JUMP JUMPDEST POP PUSH1 0x20 DUP4 ADD MLOAD PUSH2 0xF7B PUSH1 0x20 DUP7 ADD DUP3 PUSH2 0xC1A JUMP JUMPDEST POP PUSH1 0x40 DUP4 ADD MLOAD PUSH2 0xF8E PUSH1 0x40 DUP7 ADD DUP3 PUSH2 0xC1A JUMP JUMPDEST POP PUSH1 0x60 DUP4 ADD MLOAD PUSH2 0xFA1 PUSH1 0x60 DUP7 ADD DUP3 PUSH2 0xC1A JUMP JUMPDEST POP PUSH1 0x80 DUP4 ADD MLOAD PUSH2 0xFB4 PUSH1 0x80 DUP7 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0xA0 DUP4 ADD MLOAD PUSH2 0xFC7 PUSH1 0xA0 DUP7 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0xC0 DUP4 ADD MLOAD PUSH2 0xFDA PUSH1 0xC0 DUP7 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0xE0 DUP4 ADD MLOAD PUSH2 0xFED PUSH1 0xE0 DUP7 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH2 0x100 DUP4 ADD MLOAD PUSH2 0x1002 PUSH2 0x100 DUP7 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH2 0x120 DUP4 ADD MLOAD PUSH2 0x1017 PUSH2 0x120 DUP7 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH2 0x140 DUP4 ADD MLOAD DUP5 DUP3 SUB PUSH2 0x140 DUP7 ADD MSTORE PUSH2 0x1031 DUP3 DUP3 PUSH2 0xC29 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x160 DUP4 ADD MLOAD DUP5 DUP3 SUB PUSH2 0x160 DUP7 ADD MSTORE PUSH2 0x104D DUP3 DUP3 PUSH2 0xC29 JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH2 0xC23 DUP2 PUSH2 0x1208 JUMP JUMPDEST PUSH1 0x40 DUP2 ADD PUSH2 0x106D DUP3 DUP6 PUSH2 0xC1A JUMP JUMPDEST PUSH2 0x84C PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x1056 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xC5E JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xC8E JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xCE4 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xD14 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xD44 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xD74 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xDA4 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xDFA JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xE2A JUMP JUMPDEST PUSH1 0xC0 DUP2 ADD PUSH2 0x601 DUP3 DUP5 PUSH2 0xE5A JUMP JUMPDEST PUSH2 0x120 DUP2 ADD PUSH2 0x601 DUP3 DUP5 PUSH2 0xF1A JUMP JUMPDEST PUSH1 0x80 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x1138 DUP2 DUP8 PUSH2 0xF53 JUMP JUMPDEST SWAP1 POP DUP2 DUP2 SUB PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x114C DUP2 DUP7 PUSH2 0xF53 JUMP JUMPDEST SWAP1 POP DUP2 DUP2 SUB PUSH1 0x40 DUP4 ADD MSTORE PUSH2 0x1160 DUP2 DUP6 PUSH2 0xC29 JUMP JUMPDEST SWAP1 POP DUP2 DUP2 SUB PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0x1174 DUP2 DUP5 PUSH2 0xC29 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x119D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x11BC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x1F SWAP2 SWAP1 SWAP2 ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND ADD SWAP1 JUMP JUMPDEST MLOAD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 JUMP JUMPDEST SWAP1 JUMP JUMPDEST ISZERO ISZERO SWAP1 JUMP JUMPDEST DUP3 DUP2 DUP4 CALLDATACOPY POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x1237 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x121F JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0xECA JUMPI POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP1 JUMP STOP LOG2 PUSH6 0x627A7A723058 KECCAK256 SWAP13 0xf7 SIGNEXTEND DIV 0xb7 0x5f 0xc2 RETURNDATACOPY PUSH8 0x62AE4C6C8F25CCAD 0x25 0xdf 0xcb CODECOPY 0xcf SAR 0xd3 SWAP7 PUSH15 0xB27CE513DE036C6578706572696D65 PUSH15 0x74616CF50037000000000000000000 ", - "sourceMap": "986:9378:28:-;;;1673:99;8:9:-1;5:2;;;30:1;27;20:12;5:2;1673:99:28;;;;;;;;;;;;;;;;;;;;;;1734:8;:31;;-1:-1:-1;;;;;;1734:31:28;-1:-1:-1;;;;;1734:31:28;;;;;;;;;;986:9378;;5:122:-1;;83:39;114:6;108:13;83:39;;;74:48;68:59;-1:-1;;;68:59;134:263;;249:2;237:9;228:7;224:23;220:32;217:2;;;265:1;262;255:12;217:2;300:1;317:64;373:7;353:9;317:64;;;307:74;211:186;-1:-1;;;;211:186;404:128;-1:-1;;;;;473:54;;456:76;;986:9378:28;;;;;;" - }, - "deployedBytecode": { - "linkReferences": {}, - "object": "0x60806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632e9cd03381146100505780633c28d86114610086575b600080fd5b34801561005c57600080fd5b5061007061006b366004610b25565b6100b3565b60405161007d919061110a565b60405180910390f35b34801561009257600080fd5b506100a66100a1366004610b5a565b61029c565b60405161007d9190611118565b6100bb6107b1565b610140820151516000808080808080606488101561010e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110aa565b60405180910390fd5b6101408a0151610146907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08a0163ffffffff6105f216565b6101408b0151909750610181907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08a0163ffffffff6105f216565b9550868a61010001511115156101c3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110ba565b868a61010001510394508960a001519350838611151561020f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110fa565b50505083865261010087018051602088015260408701849052606087018290524260a088018190529051828503919081900386821015610255576080890186905261028f565b6101008a0151821061026d576080890184905261028f565b6102898461028461027e8487610607565b8861066d565b610684565b60808a01525b5050505050505050919050565b6102a46107e8565b6102ac6107b1565b6000606060008060006102be8a6100b3565b805160a08201519197501115610300576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110ea565b60a08601516101008b015111610342576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110ca565b608080870151908c01511015610384576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110fa565b6000546040517f3c28d86100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690633c28d861906103e0908e908e908e908e90600401611127565b61012060405180830381600087803b1580156103fb57600080fd5b505af115801561040f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506104339190810190610b06565b96508660400151945060008511156105e4576101608a0151935061045e84601063ffffffff6106c316565b92506104728b608001518760800151610724565b915061047e8583610724565b905060008111156105325789516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169163a9059cbb916104de9190859060040161105f565b602060405180830381600087803b1580156104f857600080fd5b505af115801561050c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105309190810190610ae0565b505b60008211156105e4578a516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169163a9059cbb916105909190869060040161105f565b602060405180830381600087803b1580156105aa57600080fd5b505af11580156105be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105e29190810190610ae0565b505b505050505050949350505050565b60006105fe8383610766565b90505b92915050565b60008083151561061a5760009150610666565b5082820282848281151561062a57fe5b0414610662576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101059061109a565b8091505b5092915050565b600080828481151561067b57fe5b04949350505050565b600082820183811015610662576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101059061109a565b600081601401835110151515610705576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110da565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b600082821115610760576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101059061107a565b50900390565b6000816020018351101515156107a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101059061108a565b50016020015190565b60c0604051908101604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b610120604051908101604052806107fd610817565b815260200161080a610817565b8152602001600081525090565b608060405190810160405280600081526020016000815260200160008152602001600081525090565b600061084c82356111ef565b9392505050565b600061084c825161120b565b6000601f8201831361087057600080fd5b813561088361087e826111a5565b61117e565b9150808252602083016020830185838301111561089f57600080fd5b6108aa838284611210565b50505092915050565b6000608082840312156108c557600080fd5b6108cf608061117e565b905060006108dd8484610ad4565b82525060206108ee84848301610ad4565b602083015250604061090284828501610ad4565b604083015250606061091684828501610ad4565b60608301525092915050565b6000610120828403121561093557600080fd5b61093f606061117e565b9050600061094d84846108b3565b825250608061095e848483016108b3565b60208301525061010061097384828501610ad4565b60408301525092915050565b6000610180828403121561099257600080fd5b61099d61018061117e565b905060006109ab8484610840565b82525060206109bc84848301610840565b60208301525060406109d084828501610840565b60408301525060606109e484828501610840565b60608301525060806109f884828501610ac8565b60808301525060a0610a0c84828501610ac8565b60a08301525060c0610a2084828501610ac8565b60c08301525060e0610a3484828501610ac8565b60e083015250610100610a4984828501610ac8565b61010083015250610120610a5f84828501610ac8565b6101208301525061014082013567ffffffffffffffff811115610a8157600080fd5b610a8d8482850161085f565b6101408301525061016082013567ffffffffffffffff811115610aaf57600080fd5b610abb8482850161085f565b6101608301525092915050565b600061084c8235611208565b600061084c8251611208565b600060208284031215610af257600080fd5b6000610afe8484610853565b949350505050565b60006101208284031215610b1957600080fd5b6000610afe8484610922565b600060208284031215610b3757600080fd5b813567ffffffffffffffff811115610b4e57600080fd5b610afe8482850161097f565b60008060008060808587031215610b7057600080fd5b843567ffffffffffffffff811115610b8757600080fd5b610b938782880161097f565b945050602085013567ffffffffffffffff811115610bb057600080fd5b610bbc8782880161097f565b935050604085013567ffffffffffffffff811115610bd957600080fd5b610be58782880161085f565b925050606085013567ffffffffffffffff811115610c0257600080fd5b610c0e8782880161085f565b91505092959194509250565b610c23816111ef565b82525050565b6000610c34826111eb565b808452610c4881602086016020860161121c565b610c5181611248565b9093016020019392505050565b601181527f55494e543235365f554e444552464c4f57000000000000000000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601081527f55494e543235365f4f564552464c4f5700000000000000000000000000000000602082015260400190565b601281527f494e56414c49445f41535345545f444154410000000000000000000000000000602082015260400190565b601281527f494e56414c49445f424547494e5f54494d450000000000000000000000000000602082015260400190565b600f81527f41554354494f4e5f455850495245440000000000000000000000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f32305f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601381527f41554354494f4e5f4e4f545f5354415254454400000000000000000000000000602082015260400190565b600e81527f494e56414c49445f414d4f554e54000000000000000000000000000000000000602082015260400190565b805160c0830190610e6b8482611056565b506020820151610e7e6020850182611056565b506040820151610e916040850182611056565b506060820151610ea46060850182611056565b506080820151610eb76080850182611056565b5060a0820151610eca60a0850182611056565b50505050565b80516080830190610ee18482611056565b506020820151610ef46020850182611056565b506040820151610f076040850182611056565b506060820151610eca6060850182611056565b8051610120830190610f2c8482610ed0565b506020820151610f3f6080850182610ed0565b506040820151610eca610100850182611056565b8051600090610180840190610f688582610c1a565b506020830151610f7b6020860182610c1a565b506040830151610f8e6040860182610c1a565b506060830151610fa16060860182610c1a565b506080830151610fb46080860182611056565b5060a0830151610fc760a0860182611056565b5060c0830151610fda60c0860182611056565b5060e0830151610fed60e0860182611056565b50610100830151611002610100860182611056565b50610120830151611017610120860182611056565b506101408301518482036101408601526110318282610c29565b91505061016083015184820361016086015261104d8282610c29565b95945050505050565b610c2381611208565b6040810161106d8285610c1a565b61084c6020830184611056565b6020808252810161060181610c5e565b6020808252810161060181610c8e565b6020808252810161060181610ce4565b6020808252810161060181610d14565b6020808252810161060181610d44565b6020808252810161060181610d74565b6020808252810161060181610da4565b6020808252810161060181610dfa565b6020808252810161060181610e2a565b60c081016106018284610e5a565b61012081016106018284610f1a565b608080825281016111388187610f53565b9050818103602083015261114c8186610f53565b905081810360408301526111608185610c29565b905081810360608301526111748184610c29565b9695505050505050565b60405181810167ffffffffffffffff8111828210171561119d57600080fd5b604052919050565b600067ffffffffffffffff8211156111bc57600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b5190565b73ffffffffffffffffffffffffffffffffffffffff1690565b90565b151590565b82818337506000910152565b60005b8381101561123757818101518382015260200161121f565b83811115610eca5750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905600a265627a7a723058209cf70b04b75fc23e6762ae4c6c8f25ccad25dfcb39cf1dd3966eb27ce513de036c6578706572696d656e74616cf50037", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x4B JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x2E9CD033 DUP2 EQ PUSH2 0x50 JUMPI DUP1 PUSH4 0x3C28D861 EQ PUSH2 0x86 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x70 PUSH2 0x6B CALLDATASIZE PUSH1 0x4 PUSH2 0xB25 JUMP JUMPDEST PUSH2 0xB3 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x7D SWAP2 SWAP1 PUSH2 0x110A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x92 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xA6 PUSH2 0xA1 CALLDATASIZE PUSH1 0x4 PUSH2 0xB5A JUMP JUMPDEST PUSH2 0x29C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x7D SWAP2 SWAP1 PUSH2 0x1118 JUMP JUMPDEST PUSH2 0xBB PUSH2 0x7B1 JUMP JUMPDEST PUSH2 0x140 DUP3 ADD MLOAD MLOAD PUSH1 0x0 DUP1 DUP1 DUP1 DUP1 DUP1 DUP1 PUSH1 0x64 DUP9 LT ISZERO PUSH2 0x10E JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x10AA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x140 DUP11 ADD MLOAD PUSH2 0x146 SWAP1 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0 DUP11 ADD PUSH4 0xFFFFFFFF PUSH2 0x5F2 AND JUMP JUMPDEST PUSH2 0x140 DUP12 ADD MLOAD SWAP1 SWAP8 POP PUSH2 0x181 SWAP1 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP11 ADD PUSH4 0xFFFFFFFF PUSH2 0x5F2 AND JUMP JUMPDEST SWAP6 POP DUP7 DUP11 PUSH2 0x100 ADD MLOAD GT ISZERO ISZERO PUSH2 0x1C3 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x10BA JUMP JUMPDEST DUP7 DUP11 PUSH2 0x100 ADD MLOAD SUB SWAP5 POP DUP10 PUSH1 0xA0 ADD MLOAD SWAP4 POP DUP4 DUP7 GT ISZERO ISZERO PUSH2 0x20F JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x10FA JUMP JUMPDEST POP POP POP DUP4 DUP7 MSTORE PUSH2 0x100 DUP8 ADD DUP1 MLOAD PUSH1 0x20 DUP9 ADD MSTORE PUSH1 0x40 DUP8 ADD DUP5 SWAP1 MSTORE PUSH1 0x60 DUP8 ADD DUP3 SWAP1 MSTORE TIMESTAMP PUSH1 0xA0 DUP9 ADD DUP2 SWAP1 MSTORE SWAP1 MLOAD DUP3 DUP6 SUB SWAP2 SWAP1 DUP2 SWAP1 SUB DUP7 DUP3 LT ISZERO PUSH2 0x255 JUMPI PUSH1 0x80 DUP10 ADD DUP7 SWAP1 MSTORE PUSH2 0x28F JUMP JUMPDEST PUSH2 0x100 DUP11 ADD MLOAD DUP3 LT PUSH2 0x26D JUMPI PUSH1 0x80 DUP10 ADD DUP5 SWAP1 MSTORE PUSH2 0x28F JUMP JUMPDEST PUSH2 0x289 DUP5 PUSH2 0x284 PUSH2 0x27E DUP5 DUP8 PUSH2 0x607 JUMP JUMPDEST DUP9 PUSH2 0x66D JUMP JUMPDEST PUSH2 0x684 JUMP JUMPDEST PUSH1 0x80 DUP11 ADD MSTORE JUMPDEST POP POP POP POP POP POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x2A4 PUSH2 0x7E8 JUMP JUMPDEST PUSH2 0x2AC PUSH2 0x7B1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x2BE DUP11 PUSH2 0xB3 JUMP JUMPDEST DUP1 MLOAD PUSH1 0xA0 DUP3 ADD MLOAD SWAP2 SWAP8 POP GT ISZERO PUSH2 0x300 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x10EA JUMP JUMPDEST PUSH1 0xA0 DUP7 ADD MLOAD PUSH2 0x100 DUP12 ADD MLOAD GT PUSH2 0x342 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x10CA JUMP JUMPDEST PUSH1 0x80 DUP1 DUP8 ADD MLOAD SWAP1 DUP13 ADD MLOAD LT ISZERO PUSH2 0x384 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x10FA JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 MLOAD PUSH32 0x3C28D86100000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP2 AND SWAP1 PUSH4 0x3C28D861 SWAP1 PUSH2 0x3E0 SWAP1 DUP15 SWAP1 DUP15 SWAP1 DUP15 SWAP1 DUP15 SWAP1 PUSH1 0x4 ADD PUSH2 0x1127 JUMP JUMPDEST PUSH2 0x120 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x3FB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x40F JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP PUSH2 0x433 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0xB06 JUMP JUMPDEST SWAP7 POP DUP7 PUSH1 0x40 ADD MLOAD SWAP5 POP PUSH1 0x0 DUP6 GT ISZERO PUSH2 0x5E4 JUMPI PUSH2 0x160 DUP11 ADD MLOAD SWAP4 POP PUSH2 0x45E DUP5 PUSH1 0x10 PUSH4 0xFFFFFFFF PUSH2 0x6C3 AND JUMP JUMPDEST SWAP3 POP PUSH2 0x472 DUP12 PUSH1 0x80 ADD MLOAD DUP8 PUSH1 0x80 ADD MLOAD PUSH2 0x724 JUMP JUMPDEST SWAP2 POP PUSH2 0x47E DUP6 DUP4 PUSH2 0x724 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 GT ISZERO PUSH2 0x532 JUMPI DUP10 MLOAD PUSH1 0x40 MLOAD PUSH32 0xA9059CBB00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND SWAP2 PUSH4 0xA9059CBB SWAP2 PUSH2 0x4DE SWAP2 SWAP1 DUP6 SWAP1 PUSH1 0x4 ADD PUSH2 0x105F JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x4F8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x50C JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP PUSH2 0x530 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0xAE0 JUMP JUMPDEST POP JUMPDEST PUSH1 0x0 DUP3 GT ISZERO PUSH2 0x5E4 JUMPI DUP11 MLOAD PUSH1 0x40 MLOAD PUSH32 0xA9059CBB00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND SWAP2 PUSH4 0xA9059CBB SWAP2 PUSH2 0x590 SWAP2 SWAP1 DUP7 SWAP1 PUSH1 0x4 ADD PUSH2 0x105F JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x5AA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x5BE JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP PUSH2 0x5E2 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0xAE0 JUMP JUMPDEST POP JUMPDEST POP POP POP POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5FE DUP4 DUP4 PUSH2 0x766 JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 ISZERO ISZERO PUSH2 0x61A JUMPI PUSH1 0x0 SWAP2 POP PUSH2 0x666 JUMP JUMPDEST POP DUP3 DUP3 MUL DUP3 DUP5 DUP3 DUP2 ISZERO ISZERO PUSH2 0x62A JUMPI INVALID JUMPDEST DIV EQ PUSH2 0x662 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x109A JUMP JUMPDEST DUP1 SWAP2 POP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 DUP5 DUP2 ISZERO ISZERO PUSH2 0x67B JUMPI INVALID JUMPDEST DIV SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x662 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x109A JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x14 ADD DUP4 MLOAD LT ISZERO ISZERO ISZERO PUSH2 0x705 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x10DA JUMP JUMPDEST POP ADD PUSH1 0x14 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 GT ISZERO PUSH2 0x760 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x107A JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x20 ADD DUP4 MLOAD LT ISZERO ISZERO ISZERO PUSH2 0x7A8 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x105 SWAP1 PUSH2 0x108A JUMP JUMPDEST POP ADD PUSH1 0x20 ADD MLOAD SWAP1 JUMP JUMPDEST PUSH1 0xC0 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH2 0x120 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0x7FD PUSH2 0x817 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x80A PUSH2 0x817 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x80 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x84C DUP3 CALLDATALOAD PUSH2 0x11EF JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x84C DUP3 MLOAD PUSH2 0x120B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1F DUP3 ADD DUP4 SGT PUSH2 0x870 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x883 PUSH2 0x87E DUP3 PUSH2 0x11A5 JUMP JUMPDEST PUSH2 0x117E JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE PUSH1 0x20 DUP4 ADD PUSH1 0x20 DUP4 ADD DUP6 DUP4 DUP4 ADD GT ISZERO PUSH2 0x89F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x8AA DUP4 DUP3 DUP5 PUSH2 0x1210 JUMP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x8C5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x8CF PUSH1 0x80 PUSH2 0x117E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x8DD DUP5 DUP5 PUSH2 0xAD4 JUMP JUMPDEST DUP3 MSTORE POP PUSH1 0x20 PUSH2 0x8EE DUP5 DUP5 DUP4 ADD PUSH2 0xAD4 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD MSTORE POP PUSH1 0x40 PUSH2 0x902 DUP5 DUP3 DUP6 ADD PUSH2 0xAD4 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE POP PUSH1 0x60 PUSH2 0x916 DUP5 DUP3 DUP6 ADD PUSH2 0xAD4 JUMP JUMPDEST PUSH1 0x60 DUP4 ADD MSTORE POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x120 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x935 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x93F PUSH1 0x60 PUSH2 0x117E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x94D DUP5 DUP5 PUSH2 0x8B3 JUMP JUMPDEST DUP3 MSTORE POP PUSH1 0x80 PUSH2 0x95E DUP5 DUP5 DUP4 ADD PUSH2 0x8B3 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD MSTORE POP PUSH2 0x100 PUSH2 0x973 DUP5 DUP3 DUP6 ADD PUSH2 0xAD4 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x180 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x992 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x99D PUSH2 0x180 PUSH2 0x117E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x9AB DUP5 DUP5 PUSH2 0x840 JUMP JUMPDEST DUP3 MSTORE POP PUSH1 0x20 PUSH2 0x9BC DUP5 DUP5 DUP4 ADD PUSH2 0x840 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD MSTORE POP PUSH1 0x40 PUSH2 0x9D0 DUP5 DUP3 DUP6 ADD PUSH2 0x840 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE POP PUSH1 0x60 PUSH2 0x9E4 DUP5 DUP3 DUP6 ADD PUSH2 0x840 JUMP JUMPDEST PUSH1 0x60 DUP4 ADD MSTORE POP PUSH1 0x80 PUSH2 0x9F8 DUP5 DUP3 DUP6 ADD PUSH2 0xAC8 JUMP JUMPDEST PUSH1 0x80 DUP4 ADD MSTORE POP PUSH1 0xA0 PUSH2 0xA0C DUP5 DUP3 DUP6 ADD PUSH2 0xAC8 JUMP JUMPDEST PUSH1 0xA0 DUP4 ADD MSTORE POP PUSH1 0xC0 PUSH2 0xA20 DUP5 DUP3 DUP6 ADD PUSH2 0xAC8 JUMP JUMPDEST PUSH1 0xC0 DUP4 ADD MSTORE POP PUSH1 0xE0 PUSH2 0xA34 DUP5 DUP3 DUP6 ADD PUSH2 0xAC8 JUMP JUMPDEST PUSH1 0xE0 DUP4 ADD MSTORE POP PUSH2 0x100 PUSH2 0xA49 DUP5 DUP3 DUP6 ADD PUSH2 0xAC8 JUMP JUMPDEST PUSH2 0x100 DUP4 ADD MSTORE POP PUSH2 0x120 PUSH2 0xA5F DUP5 DUP3 DUP6 ADD PUSH2 0xAC8 JUMP JUMPDEST PUSH2 0x120 DUP4 ADD MSTORE POP PUSH2 0x140 DUP3 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xA81 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xA8D DUP5 DUP3 DUP6 ADD PUSH2 0x85F JUMP JUMPDEST PUSH2 0x140 DUP4 ADD MSTORE POP PUSH2 0x160 DUP3 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xAAF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xABB DUP5 DUP3 DUP6 ADD PUSH2 0x85F JUMP JUMPDEST PUSH2 0x160 DUP4 ADD MSTORE POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x84C DUP3 CALLDATALOAD PUSH2 0x1208 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x84C DUP3 MLOAD PUSH2 0x1208 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xAF2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0xAFE DUP5 DUP5 PUSH2 0x853 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x120 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB19 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0xAFE DUP5 DUP5 PUSH2 0x922 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xB4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xAFE DUP5 DUP3 DUP6 ADD PUSH2 0x97F JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xB70 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xB87 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xB93 DUP8 DUP3 DUP9 ADD PUSH2 0x97F JUMP JUMPDEST SWAP5 POP POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xBB0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xBBC DUP8 DUP3 DUP9 ADD PUSH2 0x97F JUMP JUMPDEST SWAP4 POP POP PUSH1 0x40 DUP6 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xBD9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xBE5 DUP8 DUP3 DUP9 ADD PUSH2 0x85F JUMP JUMPDEST SWAP3 POP POP PUSH1 0x60 DUP6 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xC02 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xC0E DUP8 DUP3 DUP9 ADD PUSH2 0x85F JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP2 SWAP5 POP SWAP3 POP JUMP JUMPDEST PUSH2 0xC23 DUP2 PUSH2 0x11EF JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xC34 DUP3 PUSH2 0x11EB JUMP JUMPDEST DUP1 DUP5 MSTORE PUSH2 0xC48 DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x121C JUMP JUMPDEST PUSH2 0xC51 DUP2 PUSH2 0x1248 JUMP JUMPDEST SWAP1 SWAP4 ADD PUSH1 0x20 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x11 DUP2 MSTORE PUSH32 0x55494E543235365F554E444552464C4F57000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x26 DUP2 MSTORE PUSH32 0x475245415445525F4F525F455155414C5F544F5F33325F4C454E4754485F5245 PUSH1 0x20 DUP3 ADD MSTORE PUSH32 0x5155495245440000000000000000000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x10 DUP2 MSTORE PUSH32 0x55494E543235365F4F564552464C4F5700000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x12 DUP2 MSTORE PUSH32 0x494E56414C49445F41535345545F444154410000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x12 DUP2 MSTORE PUSH32 0x494E56414C49445F424547494E5F54494D450000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0xF DUP2 MSTORE PUSH32 0x41554354494F4E5F455850495245440000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x26 DUP2 MSTORE PUSH32 0x475245415445525F4F525F455155414C5F544F5F32305F4C454E4754485F5245 PUSH1 0x20 DUP3 ADD MSTORE PUSH32 0x5155495245440000000000000000000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x13 DUP2 MSTORE PUSH32 0x41554354494F4E5F4E4F545F5354415254454400000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0xE DUP2 MSTORE PUSH32 0x494E56414C49445F414D4F554E54000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST DUP1 MLOAD PUSH1 0xC0 DUP4 ADD SWAP1 PUSH2 0xE6B DUP5 DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0x20 DUP3 ADD MLOAD PUSH2 0xE7E PUSH1 0x20 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0x40 DUP3 ADD MLOAD PUSH2 0xE91 PUSH1 0x40 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0x60 DUP3 ADD MLOAD PUSH2 0xEA4 PUSH1 0x60 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0x80 DUP3 ADD MLOAD PUSH2 0xEB7 PUSH1 0x80 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0xA0 DUP3 ADD MLOAD PUSH2 0xECA PUSH1 0xA0 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x80 DUP4 ADD SWAP1 PUSH2 0xEE1 DUP5 DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0x20 DUP3 ADD MLOAD PUSH2 0xEF4 PUSH1 0x20 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0x40 DUP3 ADD MLOAD PUSH2 0xF07 PUSH1 0x40 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0x60 DUP3 ADD MLOAD PUSH2 0xECA PUSH1 0x60 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST DUP1 MLOAD PUSH2 0x120 DUP4 ADD SWAP1 PUSH2 0xF2C DUP5 DUP3 PUSH2 0xED0 JUMP JUMPDEST POP PUSH1 0x20 DUP3 ADD MLOAD PUSH2 0xF3F PUSH1 0x80 DUP6 ADD DUP3 PUSH2 0xED0 JUMP JUMPDEST POP PUSH1 0x40 DUP3 ADD MLOAD PUSH2 0xECA PUSH2 0x100 DUP6 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST DUP1 MLOAD PUSH1 0x0 SWAP1 PUSH2 0x180 DUP5 ADD SWAP1 PUSH2 0xF68 DUP6 DUP3 PUSH2 0xC1A JUMP JUMPDEST POP PUSH1 0x20 DUP4 ADD MLOAD PUSH2 0xF7B PUSH1 0x20 DUP7 ADD DUP3 PUSH2 0xC1A JUMP JUMPDEST POP PUSH1 0x40 DUP4 ADD MLOAD PUSH2 0xF8E PUSH1 0x40 DUP7 ADD DUP3 PUSH2 0xC1A JUMP JUMPDEST POP PUSH1 0x60 DUP4 ADD MLOAD PUSH2 0xFA1 PUSH1 0x60 DUP7 ADD DUP3 PUSH2 0xC1A JUMP JUMPDEST POP PUSH1 0x80 DUP4 ADD MLOAD PUSH2 0xFB4 PUSH1 0x80 DUP7 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0xA0 DUP4 ADD MLOAD PUSH2 0xFC7 PUSH1 0xA0 DUP7 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0xC0 DUP4 ADD MLOAD PUSH2 0xFDA PUSH1 0xC0 DUP7 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH1 0xE0 DUP4 ADD MLOAD PUSH2 0xFED PUSH1 0xE0 DUP7 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH2 0x100 DUP4 ADD MLOAD PUSH2 0x1002 PUSH2 0x100 DUP7 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH2 0x120 DUP4 ADD MLOAD PUSH2 0x1017 PUSH2 0x120 DUP7 ADD DUP3 PUSH2 0x1056 JUMP JUMPDEST POP PUSH2 0x140 DUP4 ADD MLOAD DUP5 DUP3 SUB PUSH2 0x140 DUP7 ADD MSTORE PUSH2 0x1031 DUP3 DUP3 PUSH2 0xC29 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x160 DUP4 ADD MLOAD DUP5 DUP3 SUB PUSH2 0x160 DUP7 ADD MSTORE PUSH2 0x104D DUP3 DUP3 PUSH2 0xC29 JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH2 0xC23 DUP2 PUSH2 0x1208 JUMP JUMPDEST PUSH1 0x40 DUP2 ADD PUSH2 0x106D DUP3 DUP6 PUSH2 0xC1A JUMP JUMPDEST PUSH2 0x84C PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x1056 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xC5E JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xC8E JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xCE4 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xD14 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xD44 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xD74 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xDA4 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xDFA JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x601 DUP2 PUSH2 0xE2A JUMP JUMPDEST PUSH1 0xC0 DUP2 ADD PUSH2 0x601 DUP3 DUP5 PUSH2 0xE5A JUMP JUMPDEST PUSH2 0x120 DUP2 ADD PUSH2 0x601 DUP3 DUP5 PUSH2 0xF1A JUMP JUMPDEST PUSH1 0x80 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x1138 DUP2 DUP8 PUSH2 0xF53 JUMP JUMPDEST SWAP1 POP DUP2 DUP2 SUB PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x114C DUP2 DUP7 PUSH2 0xF53 JUMP JUMPDEST SWAP1 POP DUP2 DUP2 SUB PUSH1 0x40 DUP4 ADD MSTORE PUSH2 0x1160 DUP2 DUP6 PUSH2 0xC29 JUMP JUMPDEST SWAP1 POP DUP2 DUP2 SUB PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0x1174 DUP2 DUP5 PUSH2 0xC29 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x119D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x11BC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x1F SWAP2 SWAP1 SWAP2 ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND ADD SWAP1 JUMP JUMPDEST MLOAD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 JUMP JUMPDEST SWAP1 JUMP JUMPDEST ISZERO ISZERO SWAP1 JUMP JUMPDEST DUP3 DUP2 DUP4 CALLDATACOPY POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x1237 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x121F JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0xECA JUMPI POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP1 JUMP STOP LOG2 PUSH6 0x627A7A723058 KECCAK256 SWAP13 0xf7 SIGNEXTEND DIV 0xb7 0x5f 0xc2 RETURNDATACOPY PUSH8 0x62AE4C6C8F25CCAD 0x25 0xdf 0xcb CODECOPY 0xcf SAR 0xd3 SWAP7 PUSH15 0xB27CE513DE036C6578706572696D65 PUSH15 0x74616CF50037000000000000000000 ", - "sourceMap": "986:9378:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;7335:3027;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7335:3027:28;;;;;;;;;;;;;;;;;;;;;;;;;3690:3508;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3690:3508:28;;;;;;;;;;;;;;;;;7335:3027;7437:36;;:::i;:::-;7520:20;;;;:27;7489:28;;;;;;;8295:3;8271:27;;;8250:92;;;;;;;;;;;;;;;;;;;;;;8386:20;;;;:59;;8419:25;;;8386:59;:32;:59;:::i;:::-;8484:20;;;;8352:93;;-1:-1:-1;8484:59:28;;8517:25;;;8484:59;:32;:59;:::i;:::-;8455:88;;8657:23;8627:5;:27;;;:53;8606:118;;;;;;;;;;;;;;;;8795:23;8767:5;:27;;;:51;8734:84;;8900:5;:22;;;8880:42;;8974:9;8953:18;:30;8932:91;;;;;;;;;;;;;;;;-1:-1:-1;;;9192:57:28;;;9291:27;;;;;9259:29;;;:59;9328:26;;;:47;;;9385:24;;;:36;;;9167:15;9431:33;;;:45;;;9522:27;;9055:28;;;;9167:15;9522:37;;;9573:35;;;9569:756;;;9717:28;;;:49;;;9569:756;;;9800:27;;;;9787:40;;9783:542;;10009:28;;;:40;;;9783:542;;;10111:203;10136:9;10163:137;10192:46;10200:24;10226:11;10192:7;:46::i;:::-;10260:22;10163:7;:137::i;:::-;10111:7;:203::i;:::-;10080:28;;;:234;9783:542;7335:3027;;;;;;;;;;;:::o;3690:3508::-;3901:59;;:::i;:::-;3976:36;;:::i;:::-;5398:34;6127:22;6190:13;6404:25;6510:26;4015:28;4033:9;4015:17;:28::i;:::-;4161:31;;4124:33;;;;3976:67;;-1:-1:-1;;4124:68:28;4103:134;;;;;;;;;;;;;;4413:33;;;;4379:31;;;;:67;4358:129;;;;;;;;;;;;;;4627:28;;;;;4598:25;;;;:57;;4577:118;;;;;;;;;;;;;;4780:8;;:128;;;;;:8;;;;;:20;;:128;;4814:8;;4836:9;;4859:12;;4885:13;;4780:128;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4780:128:28;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4780:128:28;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;4780:128:28;;;;;;;;;4759:149;;5435:18;:45;;;5398:82;;5523:1;5494:26;:30;5490:1667;;;6152:24;;;;;-1:-1:-1;6206:25:28;6152:24;6228:2;6206:25;:21;:25;:::i;:::-;6190:41;;6432:64;6440:8;:25;;;6467:14;:28;;;6432:7;:64::i;:::-;6404:92;;6539:54;6547:26;6575:17;6539:7;:54::i;:::-;6510:83;;6766:1;6745:18;:22;6741:132;;;6815:22;;6787:71;;;;;:27;;;;;;:71;;6815:22;6839:18;;6787:71;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6787:71:28;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6787:71:28;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;6787:71:28;;;;;;;;;;6741:132;7042:1;7022:17;:21;7018:129;;;7091:21;;7063:69;;;;;:27;;;;;;:69;;7091:21;7114:17;;7063:69;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7063:69:28;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7063:69:28;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;7063:69:28;;;;;;;;;;7018:129;3690:3508;;;;;;;;;;;;:::o;14708:220:17:-;14829:14;14876:21;14888:1;14891:5;14876:11;:21::i;:::-;14868:30;-1:-1:-1;14708:220:17;;;;;:::o;51:288:20:-;137:7;;164:6;;160:45;;;193:1;186:8;;;;160:45;-1:-1:-1;226:5:20;;;230:1;226;:5;262;;;;;;;;:10;241:73;;;;;;;;;;;;;;331:1;324:8;;51:288;;;;;;:::o;345:151::-;431:7;454:9;470:1;466;:5;;;;;;;;;345:151;-1:-1:-1;;;;345:151:20:o;716:230::-;802:7;837:5;;;873:6;;;;852:69;;;;;;;;;;;;;10268:886:17;10389:14;10452:5;10460:2;10452:10;10440:1;:8;:22;;10419:135;;;;;;;;;;;;;;;;-1:-1:-1;11056:13:17;10801:2;11056:13;11050:20;11072:42;11046:69;;10268:886::o;502:208:20:-;588:7;632:6;;;;611:70;;;;;;;;;;;;;;-1:-1:-1;698:5:20;;;502:208::o;13290:490:17:-;13411:14;13474:5;13482:2;13474:10;13462:1;:8;:22;;13441:107;;;;;;;;;;;;;;;;-1:-1:-1;13727:13:17;13629:2;13727:13;13721:20;;13290:490::o;986:9378:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;5:118:-1:-;;72:46;110:6;97:20;72:46;;;63:55;57:66;-1:-1;;;57:66;130:116;;205:36;233:6;227:13;205:36;;254:432;;344:4;332:17;;328:27;-1:-1;318:2;;369:1;366;359:12;318:2;406:6;393:20;428:60;443:44;480:6;443:44;;;428:60;;;419:69;;508:6;501:5;494:21;544:4;536:6;532:17;577:4;570:5;566:16;612:3;603:6;598:3;594:16;591:25;588:2;;;629:1;626;619:12;588:2;639:41;673:6;668:3;663;639:41;;;311:375;;;;;;;;1183:861;;1308:4;1296:9;1291:3;1287:19;1283:30;1280:2;;;1326:1;1323;1316:12;1280:2;1344:20;1359:4;1344:20;;;1335:29;-1:-1;1432:1;1463:60;1519:3;1499:9;1463:60;;;1439:85;;-1:-1;1603:2;1636:60;1692:3;1668:22;;;1636:60;;;1629:4;1622:5;1618:16;1611:86;1545:163;1766:2;1799:60;1855:3;1846:6;1835:9;1831:22;1799:60;;;1792:4;1785:5;1781:16;1774:86;1718:153;1929:2;1962:60;2018:3;2009:6;1998:9;1994:22;1962:60;;;1955:4;1948:5;1944:16;1937:86;1881:153;1274:770;;;;;2098:741;;2234:5;2222:9;2217:3;2213:19;2209:31;2206:2;;;2253:1;2250;2243:12;2206:2;2271:20;2286:4;2271:20;;;2262:29;-1:-1;2341:1;2372:85;2453:3;2433:9;2372:85;;;2348:110;;-1:-1;2520:3;2554:85;2635:3;2611:22;;;2554:85;;;2547:4;2540:5;2536:16;2529:111;2479:172;2723:3;2757:60;2813:3;2804:6;2793:9;2789:22;2757:60;;;2750:4;2743:5;2739:16;2732:86;2661:168;2200:639;;;;;2874:2208;;2985:5;2973:9;2968:3;2964:19;2960:31;2957:2;;;3004:1;3001;2994:12;2957:2;3022:21;3037:5;3022:21;;;3013:30;-1:-1;3101:1;3132:49;3177:3;3157:9;3132:49;;;3108:74;;-1:-1;3251:2;3284:49;3329:3;3305:22;;;3284:49;;;3277:4;3270:5;3266:16;3259:75;3203:142;3410:2;3443:49;3488:3;3479:6;3468:9;3464:22;3443:49;;;3436:4;3429:5;3425:16;3418:75;3355:149;3563:2;3596:49;3641:3;3632:6;3621:9;3617:22;3596:49;;;3589:4;3582:5;3578:16;3571:75;3514:143;3719:3;3753:49;3798:3;3789:6;3778:9;3774:22;3753:49;;;3746:4;3739:5;3735:16;3728:75;3667:147;3876:3;3910:49;3955:3;3946:6;3935:9;3931:22;3910:49;;;3903:4;3896:5;3892:16;3885:75;3824:147;4025:3;4059:49;4104:3;4095:6;4084:9;4080:22;4059:49;;;4052:4;4045:5;4041:16;4034:75;3981:139;4174:3;4208:49;4253:3;4244:6;4233:9;4229:22;4208:49;;;4201:4;4194:5;4190:16;4183:75;4130:139;4336:3;4371:49;4416:3;4407:6;4396:9;4392:22;4371:49;;;4363:5;4356;4352:17;4345:76;4279:153;4482:3;4517:49;4562:3;4553:6;4542:9;4538:22;4517:49;;;4509:5;4502;4498:17;4491:76;4442:136;4666:3;4655:9;4651:19;4638:33;4691:18;4683:6;4680:30;4677:2;;;4723:1;4720;4713:12;4677:2;4759:54;4809:3;4800:6;4789:9;4785:22;4759:54;;;4751:5;4744;4740:17;4733:81;4588:237;4913:3;4902:9;4898:19;4885:33;4938:18;4930:6;4927:30;4924:2;;;4970:1;4967;4960:12;4924:2;5006:54;5056:3;5047:6;5036:9;5032:22;5006:54;;;4998:5;4991;4987:17;4980:81;4835:237;2951:2131;;;;;5089:118;;5156:46;5194:6;5181:20;5156:46;;5214:122;;5292:39;5323:6;5317:13;5292:39;;5343:257;;5455:2;5443:9;5434:7;5430:23;5426:32;5423:2;;;5471:1;5468;5461:12;5423:2;5506:1;5523:61;5576:7;5556:9;5523:61;;;5513:71;5417:183;-1:-1;;;;5417:183;5607:336;;5758:3;5746:9;5737:7;5733:23;5729:33;5726:2;;;5775:1;5772;5765:12;5726:2;5810:1;5827:100;5919:7;5899:9;5827:100;;5950:371;;6076:2;6064:9;6055:7;6051:23;6047:32;6044:2;;;6092:1;6089;6082:12;6044:2;6127:31;;6178:18;6167:30;;6164:2;;;6210:1;6207;6200:12;6164:2;6230:75;6297:7;6288:6;6277:9;6273:22;6230:75;;6328:1085;;;;;6545:3;6533:9;6524:7;6520:23;6516:33;6513:2;;;6562:1;6559;6552:12;6513:2;6597:31;;6648:18;6637:30;;6634:2;;;6680:1;6677;6670:12;6634:2;6700:75;6767:7;6758:6;6747:9;6743:22;6700:75;;;6690:85;;6576:205;6840:2;6829:9;6825:18;6812:32;6864:18;6856:6;6853:30;6850:2;;;6896:1;6893;6886:12;6850:2;6916:75;6983:7;6974:6;6963:9;6959:22;6916:75;;;6906:85;;6791:206;7056:2;7045:9;7041:18;7028:32;7080:18;7072:6;7069:30;7066:2;;;7112:1;7109;7102:12;7066:2;7132:62;7186:7;7177:6;7166:9;7162:22;7132:62;;;7122:72;;7007:193;7259:2;7248:9;7244:18;7231:32;7283:18;7275:6;7272:30;7269:2;;;7315:1;7312;7305:12;7269:2;7335:62;7389:7;7380:6;7369:9;7365:22;7335:62;;;7325:72;;7210:193;6507:906;;;;;;;;7420:110;7493:31;7518:5;7493:31;;;7488:3;7481:44;7475:55;;;7537:297;;7637:38;7669:5;7637:38;;;7692:6;7687:3;7680:19;7704:63;7760:6;7753:4;7748:3;7744:14;7737:4;7730:5;7726:16;7704:63;;;7799:29;7821:6;7799:29;;;7779:50;;;7792:4;7779:50;;7617:217;-1:-1;;;7617:217;8138:296;8293:2;8281:15;;8330:66;8325:2;8316:12;;8309:88;8425:2;8416:12;;8274:160;8443:397;8598:2;8586:15;;8635:66;8630:2;8621:12;;8614:88;8736:66;8731:2;8722:12;;8715:88;8831:2;8822:12;;8579:261;8849:296;9004:2;8992:15;;9041:66;9036:2;9027:12;;9020:88;9136:2;9127:12;;8985:160;9154:296;9309:2;9297:15;;9346:66;9341:2;9332:12;;9325:88;9441:2;9432:12;;9290:160;9459:296;9614:2;9602:15;;9651:66;9646:2;9637:12;;9630:88;9746:2;9737:12;;9595:160;9764:296;9919:2;9907:15;;9956:66;9951:2;9942:12;;9935:88;10051:2;10042:12;;9900:160;10069:397;10224:2;10212:15;;10261:66;10256:2;10247:12;;10240:88;10362:66;10357:2;10348:12;;10341:88;10457:2;10448:12;;10205:261;10475:296;10630:2;10618:15;;10667:66;10662:2;10653:12;;10646:88;10762:2;10753:12;;10611:160;10780:296;10935:2;10923:15;;10972:66;10967:2;10958:12;;10951:88;11067:2;11058:12;;10916:160;11163:1231;11387:22;;11306:4;11297:14;;;11421:61;11301:3;11387:22;11421:61;;;11326:168;11580:4;11573:5;11569:16;11563:23;11598:62;11654:4;11649:3;11645:14;11632:11;11598:62;;;11504:168;11755:4;11748:5;11744:16;11738:23;11773:62;11829:4;11824:3;11820:14;11807:11;11773:62;;;11682:165;11928:4;11921:5;11917:16;11911:23;11946:62;12002:4;11997:3;11993:14;11980:11;11946:62;;;11857:163;12105:4;12098:5;12094:16;12088:23;12123:62;12179:4;12174:3;12170:14;12157:11;12123:62;;;12030:167;12287:4;12280:5;12276:16;12270:23;12305:62;12361:4;12356:3;12352:14;12339:11;12305:62;;;12207:172;11279:1115;;;;12478:884;12702:22;;12615:4;12606:14;;;12736:61;12610:3;12702:22;12736:61;;;12635:174;12903:4;12896:5;12892:16;12886:23;12921:62;12977:4;12972:3;12968:14;12955:11;12921:62;;;12819:176;13079:4;13072:5;13068:16;13062:23;13097:62;13153:4;13148:3;13144:14;13131:11;13097:62;;;13005:166;13255:4;13248:5;13244:16;13238:23;13273:62;13329:4;13324:3;13320:14;13307:11;13273:62;;13460:815;13685:22;;13615:5;13606:15;;;13719:115;13610:3;13685:22;13719:115;;;13636:210;13923:4;13916:5;13912:16;13906:23;13941:116;14051:4;14046:3;14042:14;14029:11;13941:116;;;13856:213;14167:4;14160:5;14156:16;14150:23;14185:63;14241:5;14236:3;14232:15;14219:11;14185:63;;14335:2417;14548:22;;14335:2417;;14470:5;14461:15;;;14582:61;14465:3;14548:22;14582:61;;;14491:164;14739:4;14732:5;14728:16;14722:23;14757:62;14813:4;14808:3;14804:14;14791:11;14757:62;;;14665:166;14922:4;14915:5;14911:16;14905:23;14940:62;14996:4;14991:3;14987:14;14974:11;14940:62;;;14841:173;15099:4;15092:5;15088:16;15082:23;15117:62;15173:4;15168:3;15164:14;15151:11;15117:62;;;15024:167;15279:4;15272:5;15268:16;15262:23;15297:62;15353:4;15348:3;15344:14;15331:11;15297:62;;;15201:170;15459:4;15452:5;15448:16;15442:23;15477:62;15533:4;15528:3;15524:14;15511:11;15477:62;;;15381:170;15631:4;15624:5;15620:16;15614:23;15649:62;15705:4;15700:3;15696:14;15683:11;15649:62;;;15561:162;15803:4;15796:5;15792:16;15786:23;15821:62;15877:4;15872:3;15868:14;15855:11;15821:62;;;15733:162;15988:5;15981;15977:17;15971:24;16007:63;16063:5;16058:3;16054:15;16041:11;16007:63;;;15905:177;16158:5;16151;16147:17;16141:24;16177:63;16233:5;16228:3;16224:15;16211:11;16177:63;;;16092:160;16338:5;16331;16327:17;16321:24;16391:3;16385:4;16381:14;16373:5;16368:3;16364:15;16357:39;16411:66;16472:4;16459:11;16411:66;;;16403:74;;16262:227;16575:5;16568;16564:17;16558:24;16628:3;16622:4;16618:14;16610:5;16605:3;16601:15;16594:39;16648:66;16709:4;16696:11;16648:66;;;16640:74;14443:2309;-1:-1;;;;;14443:2309;16759:110;16832:31;16857:5;16832:31;;16876:294;17012:2;16997:18;;17026:61;17001:9;17060:6;17026:61;;;17098:62;17156:2;17145:9;17141:18;17132:6;17098:62;;17177:387;17358:2;17372:47;;;17343:18;;17433:121;17343:18;17433:121;;17571:387;17752:2;17766:47;;;17737:18;;17827:121;17737:18;17827:121;;17965:387;18146:2;18160:47;;;18131:18;;18221:121;18131:18;18221:121;;18359:387;18540:2;18554:47;;;18525:18;;18615:121;18525:18;18615:121;;18753:387;18934:2;18948:47;;;18919:18;;19009:121;18919:18;19009:121;;19147:387;19328:2;19342:47;;;19313:18;;19403:121;19313:18;19403:121;;19541:387;19722:2;19736:47;;;19707:18;;19797:121;19707:18;19797:121;;19935:387;20116:2;20130:47;;;20101:18;;20191:121;20101:18;20191:121;;20329:387;20510:2;20524:47;;;20495:18;;20585:121;20495:18;20585:121;;20723:314;20891:3;20876:19;;20906:121;20880:9;21000:6;20906:121;;21044:338;21224:3;21209:19;;21239:133;21213:9;21345:6;21239:133;;21389:937;21705:3;21720:47;;;21690:19;;21781:92;21690:19;21859:6;21781:92;;;21773:100;;21921:9;21915:4;21911:20;21906:2;21895:9;21891:18;21884:48;21946:92;22033:4;22024:6;21946:92;;;21938:100;;22086:9;22080:4;22076:20;22071:2;22060:9;22056:18;22049:48;22111:66;22172:4;22163:6;22111:66;;;22103:74;;22225:9;22219:4;22215:20;22210:2;22199:9;22195:18;22188:48;22250:66;22311:4;22302:6;22250:66;;;22242:74;21676:650;-1:-1;;;;;;21676:650;22333:256;22395:2;22389:9;22421:17;;;22496:18;22481:34;;22517:22;;;22478:62;22475:2;;;22553:1;22550;22543:12;22475:2;22569;22562:22;22373:216;;-1:-1;22373:216;22596:254;;22735:18;22727:6;22724:30;22721:2;;;22767:1;22764;22757:12;22721:2;-1:-1;22840:4;22811;22788:17;;;;22807:9;22784:33;22830:15;;22658:192;23122:87;23192:12;;23176:33;23314:128;23394:42;23383:54;;23366:76;23449:79;23518:5;23501:27;23670:92;23743:13;23736:21;;23719:43;23856:145;23937:6;23932:3;23927;23914:30;-1:-1;23993:1;23975:16;;23968:27;23907:94;24010:268;24075:1;24082:101;24096:6;24093:1;24090:13;24082:101;;;24163:11;;;24157:18;24144:11;;;24137:39;24118:2;24111:10;24082:101;;;24198:6;24195:1;24192:13;24189:2;;;-1:-1;;24263:1;24245:16;;24238:27;24059:219;24286:97;24374:2;24354:14;24370:7;24350:28;;24334:49" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/artifacts/ERC20Proxy.json b/packages/contract-artifacts/artifacts/ERC20Proxy.json deleted file mode 100644 index 33af866e7..000000000 --- a/packages/contract-artifacts/artifacts/ERC20Proxy.json +++ /dev/null @@ -1,195 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "ERC20Proxy", - "compilerOutput": { - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "target", - "type": "address" - } - ], - "name": "addAuthorizedAddress", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "authorities", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "target", - "type": "address" - } - ], - "name": "removeAuthorizedAddress", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "target", - "type": "address" - }, - { - "name": "index", - "type": "uint256" - } - ], - "name": "removeAuthorizedAddressAtIndex", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getProxyId", - "outputs": [ - { - "name": "", - "type": "bytes4" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "authorized", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getAuthorizedAddresses", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "payable": false, - "stateMutability": "nonpayable", - "type": "fallback" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "target", - "type": "address" - }, - { - "indexed": true, - "name": "caller", - "type": "address" - } - ], - "name": "AuthorizedAddressAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "target", - "type": "address" - }, - { - "indexed": true, - "name": "caller", - "type": "address" - } - ], - "name": "AuthorizedAddressRemoved", - "type": "event" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": - "0x608060405260008054600160a060020a03191633179055610f4a806100256000396000f3006080604052600436106100985763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166342f1181e8114610248578063494503d41461027857806370712939146102b95780638da5cb5b146102e75780639ad26744146102fc578063ae25532e1461032d578063b918161114610377578063d39de6e9146103b9578063f2fde38b1461041e575b3480156100a457600080fd5b507fffffffff00000000000000000000000000000000000000000000000000000000600035167fa85e59e40000000000000000000000000000000000000000000000000000000081141561024357604080513381526001602082015290812054151561017b577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c1553454e4445525f4e4f545f415554484f52495a454400000000000000604052600060605260646000fd5b602860043501357f23b872dd0000000000000000000000000000000000000000000000000000000060005260606024600437602060006064600080855af1600080511160203d14163d15178116905080156101d257005b7f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f5452414e534645525f4641494c454400000000000000000000000000604052600060605260646000fd5b600080fd5b34801561025457600080fd5b5061027673ffffffffffffffffffffffffffffffffffffffff6004351661044c565b005b34801561028457600080fd5b50610290600435610638565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156102c557600080fd5b5061027673ffffffffffffffffffffffffffffffffffffffff6004351661066d565b3480156102f357600080fd5b50610290610966565b34801561030857600080fd5b5061027673ffffffffffffffffffffffffffffffffffffffff60043516602435610982565b34801561033957600080fd5b50610342610d37565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b34801561038357600080fd5b506103a573ffffffffffffffffffffffffffffffffffffffff60043516610d6d565b604080519115158252519081900360200190f35b3480156103c557600080fd5b506103ce610d82565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561040a5781810151838201526020016103f2565b505050509050019250505060405180910390f35b34801561042a57600080fd5b5061027673ffffffffffffffffffffffffffffffffffffffff60043516610df1565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104d257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff161561056757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5441524745545f414c52454144595f415554484f52495a454400000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116600081815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168317905560028054928301815583527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055513392917f3147867c59d17e8fa9d522465651d44aae0a9e38f902f3475b97e58072f0ed4c91a350565b600280548290811061064657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146106f457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205460ff16151561078a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5441524745545f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b5073ffffffffffffffffffffffffffffffffffffffff8116600090815260016020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b60025481101561091f578173ffffffffffffffffffffffffffffffffffffffff1660028281548110151561080757fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561091757600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061085f57fe5b6000918252602090912001546002805473ffffffffffffffffffffffffffffffffffffffff909216918390811061089257fe5b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906109119082610ed7565b5061091f565b6001016107d7565b604051339073ffffffffffffffffffffffffffffffffffffffff8416907f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b090600090a35050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a0857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205460ff161515610a9e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5441524745545f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b6002548110610b0e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e4445585f4f55545f4f465f424f554e445300000000000000000000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff16600282815481101515610b3457fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614610bc257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f415554484f52495a45445f414444524553535f4d49534d415443480000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110610c3d57fe5b6000918252602090912001546002805473ffffffffffffffffffffffffffffffffffffffff9092169183908110610c7057fe5b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190610cef9082610ed7565b50604051339073ffffffffffffffffffffffffffffffffffffffff8416907f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b090600090a35050565b604080517f4552433230546f6b656e28616464726573732900000000000000000000000000815290519081900360130190205b90565b60016020526000908152604090205460ff1681565b60606002805480602002602001604051908101604052809291908181526020018280548015610de757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610dbc575b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e7757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811615610ed457600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b815481835581811115610efb57600083815260209020610efb918101908301610f00565b505050565b610d6a91905b80821115610f1a5760008155600101610f06565b50905600a165627a7a72305820f6b2cadda0be9b47f37ed4a850b096e49b5e2e8bb7446d65481adecf980824a00029" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/artifacts/ERC20Token.json b/packages/contract-artifacts/artifacts/ERC20Token.json deleted file mode 100644 index d89d08a77..000000000 --- a/packages/contract-artifacts/artifacts/ERC20Token.json +++ /dev/null @@ -1,189 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "ERC20Token", - "compilerOutput": { - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "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, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "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" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": - "0x608060405234801561001057600080fd5b506106a0806100206000396000f3006080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461007c57806318160ddd146100c157806323b872dd146100e857806370a082311461011f578063a9059cbb1461014d578063dd62ed3e1461017e575b600080fd5b34801561008857600080fd5b506100ad73ffffffffffffffffffffffffffffffffffffffff600435166024356101b2565b604080519115158252519081900360200190f35b3480156100cd57600080fd5b506100d6610225565b60408051918252519081900360200190f35b3480156100f457600080fd5b506100ad73ffffffffffffffffffffffffffffffffffffffff6004358116906024351660443561022b565b34801561012b57600080fd5b506100d673ffffffffffffffffffffffffffffffffffffffff60043516610487565b34801561015957600080fd5b506100ad73ffffffffffffffffffffffffffffffffffffffff600435166024356104af565b34801561018a57600080fd5b506100d673ffffffffffffffffffffffffffffffffffffffff6004358116906024351661063c565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60025490565b73ffffffffffffffffffffffffffffffffffffffff83166000908152602081905260408120548211156102bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45524332305f494e53554646494349454e545f42414c414e4345000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260016020908152604080832033845290915290205482111561035e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45524332305f494e53554646494349454e545f414c4c4f57414e434500000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110156103f457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff80841660008181526020818152604080832080548801905593881680835284832080548890039055600182528483203384528252918490208054879003905583518681529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3360009081526020819052604081205482111561052d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45524332305f494e53554646494349454e545f42414c414e4345000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110156105c357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b336000818152602081815260408083208054879003905573ffffffffffffffffffffffffffffffffffffffff871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600160209081526040808320939094168252919091522054905600a165627a7a72305820203a592c9390a8a005821d7dffa1c27ae97bf827d8ef17cfee3a8a70776b22d90029" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/artifacts/ERC721Proxy.json b/packages/contract-artifacts/artifacts/ERC721Proxy.json deleted file mode 100644 index db01e40f0..000000000 --- a/packages/contract-artifacts/artifacts/ERC721Proxy.json +++ /dev/null @@ -1,195 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "ERC721Proxy", - "compilerOutput": { - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "target", - "type": "address" - } - ], - "name": "addAuthorizedAddress", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "authorities", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "target", - "type": "address" - } - ], - "name": "removeAuthorizedAddress", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "target", - "type": "address" - }, - { - "name": "index", - "type": "uint256" - } - ], - "name": "removeAuthorizedAddressAtIndex", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getProxyId", - "outputs": [ - { - "name": "", - "type": "bytes4" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "authorized", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getAuthorizedAddresses", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "payable": false, - "stateMutability": "nonpayable", - "type": "fallback" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "target", - "type": "address" - }, - { - "indexed": true, - "name": "caller", - "type": "address" - } - ], - "name": "AuthorizedAddressAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "target", - "type": "address" - }, - { - "indexed": true, - "name": "caller", - "type": "address" - } - ], - "name": "AuthorizedAddressRemoved", - "type": "event" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": - "0x608060405260008054600160a060020a03191633179055610fbe806100256000396000f3006080604052600436106100985763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166342f1181e81146102bc578063494503d4146102ec578063707129391461032d5780638da5cb5b1461035b5780639ad2674414610370578063ae25532e146103a1578063b9181611146103eb578063d39de6e91461042d578063f2fde38b14610492575b3480156100a457600080fd5b507fffffffff00000000000000000000000000000000000000000000000000000000600035167fa85e59e4000000000000000000000000000000000000000000000000000000008114156102b757604080513381526001602082015290812054151561017b577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c1553454e4445525f4e4f545f415554484f52495a454400000000000000604052600060605260646000fd5b600160643503156101f7577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0e494e56414c49445f414d4f554e540000000000000000000000000000604052600060605260646000fd5b7f23b872dd000000000000000000000000000000000000000000000000000000006000526040602460043760043560206048820160443760288101356000806064600080855af1801561024657005b7f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f5452414e534645525f4641494c454400000000000000000000000000604052600060605260646000fd5b600080fd5b3480156102c857600080fd5b506102ea73ffffffffffffffffffffffffffffffffffffffff600435166104c0565b005b3480156102f857600080fd5b506103046004356106ac565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561033957600080fd5b506102ea73ffffffffffffffffffffffffffffffffffffffff600435166106e1565b34801561036757600080fd5b506103046109da565b34801561037c57600080fd5b506102ea73ffffffffffffffffffffffffffffffffffffffff600435166024356109f6565b3480156103ad57600080fd5b506103b6610dab565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b3480156103f757600080fd5b5061041973ffffffffffffffffffffffffffffffffffffffff60043516610de1565b604080519115158252519081900360200190f35b34801561043957600080fd5b50610442610df6565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561047e578181015183820152602001610466565b505050509050019250505060405180910390f35b34801561049e57600080fd5b506102ea73ffffffffffffffffffffffffffffffffffffffff60043516610e65565b60005473ffffffffffffffffffffffffffffffffffffffff16331461054657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff16156105db57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5441524745545f414c52454144595f415554484f52495a454400000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116600081815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168317905560028054928301815583527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055513392917f3147867c59d17e8fa9d522465651d44aae0a9e38f902f3475b97e58072f0ed4c91a350565b60028054829081106106ba57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461076857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205460ff1615156107fe57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5441524745545f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b5073ffffffffffffffffffffffffffffffffffffffff8116600090815260016020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b600254811015610993578173ffffffffffffffffffffffffffffffffffffffff1660028281548110151561087b57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561098b57600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81019081106108d357fe5b6000918252602090912001546002805473ffffffffffffffffffffffffffffffffffffffff909216918390811061090657fe5b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906109859082610f4b565b50610993565b60010161084b565b604051339073ffffffffffffffffffffffffffffffffffffffff8416907f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b090600090a35050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a7c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205460ff161515610b1257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5441524745545f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b6002548110610b8257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e4445585f4f55545f4f465f424f554e445300000000000000000000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff16600282815481101515610ba857fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614610c3657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f415554484f52495a45445f414444524553535f4d49534d415443480000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110610cb157fe5b6000918252602090912001546002805473ffffffffffffffffffffffffffffffffffffffff9092169183908110610ce457fe5b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190610d639082610f4b565b50604051339073ffffffffffffffffffffffffffffffffffffffff8416907f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b090600090a35050565b604080517f455243373231546f6b656e28616464726573732c75696e7432353629000000008152905190819003601c0190205b90565b60016020526000908152604090205460ff1681565b60606002805480602002602001604051908101604052809291908181526020018280548015610e5b57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610e30575b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314610eeb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811615610f4857600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b815481835581811115610f6f57600083815260209020610f6f918101908301610f74565b505050565b610dde91905b80821115610f8e5760008155600101610f7a565b50905600a165627a7a7230582051377ae1ca7b3f3d032510ea8cba18dc3e6ce467f660ab6b18edebeb780449c60029" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/artifacts/ERC721Token.json b/packages/contract-artifacts/artifacts/ERC721Token.json deleted file mode 100644 index d189090e8..000000000 --- a/packages/contract-artifacts/artifacts/ERC721Token.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "ERC721Token", - "compilerOutput": { - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_approved", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_operator", - "type": "address" - }, - { - "name": "_approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - }, - { - "name": "_data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_from", - "type": "address" - }, - { - "indexed": true, - "name": "_to", - "type": "address" - }, - { - "indexed": true, - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_approved", - "type": "address" - }, - { - "indexed": true, - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_operator", - "type": "address" - }, - { - "indexed": false, - "name": "_approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": - "0x608060405234801561001057600080fd5b50610e2d806100206000396000f3006080604052600436106100985763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663081812fc811461009d578063095ea7b3146100de57806323b872dd1461011157806342842e0e146101485780636352211e1461017f57806370a0823114610197578063a22cb465146101d7578063b88d4fde1461020a578063e985e9c514610250575b600080fd5b3480156100a957600080fd5b506100b5600435610298565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100ea57600080fd5b5061010f73ffffffffffffffffffffffffffffffffffffffff600435166024356102c0565b005b34801561011d57600080fd5b5061010f73ffffffffffffffffffffffffffffffffffffffff600435811690602435166044356103e4565b34801561015457600080fd5b5061010f73ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610744565b34801561018b57600080fd5b506100b560043561090f565b3480156101a357600080fd5b506101c573ffffffffffffffffffffffffffffffffffffffff600435166109a8565b60408051918252519081900360200190f35b3480156101e357600080fd5b5061010f73ffffffffffffffffffffffffffffffffffffffff600435166024351515610a57565b34801561021657600080fd5b5061010f73ffffffffffffffffffffffffffffffffffffffff60048035821691602480359091169160443591606435908101910135610af0565b34801561025c57600080fd5b5061028473ffffffffffffffffffffffffffffffffffffffff60043581169060243516610cd4565b604080519115158252519081900360200190f35b60009081526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60006102cb8261090f565b90503373ffffffffffffffffffffffffffffffffffffffff821614806102f657506102f68133610cd4565b151561036357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f494e56414c49445f53454e4445520000000000000000000000604482015290519081900360640190fd5b60008281526001602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000808073ffffffffffffffffffffffffffffffffffffffff8516151561046c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f5a45524f5f544f5f4144445245535300000000000000000000604482015290519081900360640190fd5b6104758461090f565b925073ffffffffffffffffffffffffffffffffffffffff868116908416146104fe57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f4f574e45525f4d49534d415443480000000000000000000000604482015290519081900360640190fd5b33915061050a84610298565b90508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148061054b575061054b8383610cd4565b8061058157508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15156105ee57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f494e56414c49445f5350454e44455200000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81161561063f57600084815260016020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b60008481526020818152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8a8116919091179091558916835260029091529020546106a8906001610d0f565b73ffffffffffffffffffffffffffffffffffffffff80881660009081526002602052604080822093909355908716815220546106e5906001610d86565b73ffffffffffffffffffffffffffffffffffffffff808716600081815260026020526040808220949094559251879391928a16917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050505050565b6000806107528585856103e4565b833b9150600082111561090857604080517f150b7a0200000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8781166024830152604482018690526080606483015260006084830181905292519087169263150b7a029260c480820193602093909283900390910190829087803b1580156107ef57600080fd5b505af1158015610803573d6000803e3d6000fd5b505050506040513d602081101561081957600080fd5b5051604080517f6f6e455243373231526563656976656428616464726573732c6164647265737381527f2c75696e743235362c62797465732900000000000000000000000000000000006020820152905190819003602f0190209091507fffffffff0000000000000000000000000000000000000000000000000000000080831691161461090857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4552433732315f494e56414c49445f53454c4543544f52000000000000000000604482015290519081900360640190fd5b5050505050565b60008181526020819052604081205473ffffffffffffffffffffffffffffffffffffffff168015156109a257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4552433732315f5a45524f5f4f574e4552000000000000000000000000000000604482015290519081900360640190fd5b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82161515610a2e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4552433732315f5a45524f5f4f574e4552000000000000000000000000000000604482015290519081900360640190fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b33600081815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b600080610afe8787876103e4565b853b91506000821115610ccb576040517f150b7a02000000000000000000000000000000000000000000000000000000008152336004820181815273ffffffffffffffffffffffffffffffffffffffff8a811660248501526044840189905260806064850190815260848501889052908a169363150b7a0293928c928b928b928b92909160a40184848082843782019150509650505050505050602060405180830381600087803b158015610bb257600080fd5b505af1158015610bc6573d6000803e3d6000fd5b505050506040513d6020811015610bdc57600080fd5b5051604080517f6f6e455243373231526563656976656428616464726573732c6164647265737381527f2c75696e743235362c62797465732900000000000000000000000000000000006020820152905190819003602f0190209091507fffffffff00000000000000000000000000000000000000000000000000000000808316911614610ccb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4552433732315f494e56414c49445f53454c4543544f52000000000000000000604482015290519081900360640190fd5b50505050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260036020908152604080832093909416825291909152205460ff1690565b600082821115610d8057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f55494e543235365f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b50900390565b600082820183811015610dfa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b93925050505600a165627a7a723058207318c14c91209a554964c5f972b95a90fe384dd7dd96ccfd0609544e6439c3c90029" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/artifacts/Exchange.json b/packages/contract-artifacts/artifacts/Exchange.json deleted file mode 100644 index 6e586b899..000000000 --- a/packages/contract-artifacts/artifacts/Exchange.json +++ /dev/null @@ -1,1981 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "Exchange", - "compilerOutput": { - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "name": "filled", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "orders", - "type": "tuple[]" - }, - { - "name": "takerAssetFillAmounts", - "type": "uint256[]" - }, - { - "name": "signatures", - "type": "bytes[]" - } - ], - "name": "batchFillOrders", - "outputs": [ - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "totalFillResults", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "name": "cancelled", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "hash", - "type": "bytes32" - }, - { - "name": "signerAddress", - "type": "address" - }, - { - "name": "signature", - "type": "bytes" - } - ], - "name": "preSign", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "leftOrder", - "type": "tuple" - }, - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "rightOrder", - "type": "tuple" - }, - { - "name": "leftSignature", - "type": "bytes" - }, - { - "name": "rightSignature", - "type": "bytes" - } - ], - "name": "matchOrders", - "outputs": [ - { - "components": [ - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "left", - "type": "tuple" - }, - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "right", - "type": "tuple" - }, - { - "name": "leftMakerAssetSpreadAmount", - "type": "uint256" - } - ], - "name": "matchedFillResults", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "order", - "type": "tuple" - }, - { - "name": "takerAssetFillAmount", - "type": "uint256" - }, - { - "name": "signature", - "type": "bytes" - } - ], - "name": "fillOrderNoThrow", - "outputs": [ - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "fillResults", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes4" - } - ], - "name": "assetProxies", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "orders", - "type": "tuple[]" - } - ], - "name": "batchCancelOrders", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "orders", - "type": "tuple[]" - }, - { - "name": "takerAssetFillAmounts", - "type": "uint256[]" - }, - { - "name": "signatures", - "type": "bytes[]" - } - ], - "name": "batchFillOrKillOrders", - "outputs": [ - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "totalFillResults", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "targetOrderEpoch", - "type": "uint256" - } - ], - "name": "cancelOrdersUpTo", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "orders", - "type": "tuple[]" - }, - { - "name": "takerAssetFillAmounts", - "type": "uint256[]" - }, - { - "name": "signatures", - "type": "bytes[]" - } - ], - "name": "batchFillOrdersNoThrow", - "outputs": [ - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "totalFillResults", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "assetProxyId", - "type": "bytes4" - } - ], - "name": "getAssetProxy", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "name": "transactions", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "order", - "type": "tuple" - }, - { - "name": "takerAssetFillAmount", - "type": "uint256" - }, - { - "name": "signature", - "type": "bytes" - } - ], - "name": "fillOrKillOrder", - "outputs": [ - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "fillResults", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "validatorAddress", - "type": "address" - }, - { - "name": "approval", - "type": "bool" - } - ], - "name": "setSignatureValidatorApproval", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - }, - { - "name": "", - "type": "address" - } - ], - "name": "allowedValidators", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "orders", - "type": "tuple[]" - }, - { - "name": "takerAssetFillAmount", - "type": "uint256" - }, - { - "name": "signatures", - "type": "bytes[]" - } - ], - "name": "marketSellOrders", - "outputs": [ - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "totalFillResults", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "orders", - "type": "tuple[]" - } - ], - "name": "getOrdersInfo", - "outputs": [ - { - "components": [ - { - "name": "orderStatus", - "type": "uint8" - }, - { - "name": "orderHash", - "type": "bytes32" - }, - { - "name": "orderTakerAssetFilledAmount", - "type": "uint256" - } - ], - "name": "", - "type": "tuple[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - }, - { - "name": "", - "type": "address" - } - ], - "name": "preSigned", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "hash", - "type": "bytes32" - }, - { - "name": "signerAddress", - "type": "address" - }, - { - "name": "signature", - "type": "bytes" - } - ], - "name": "isValidSignature", - "outputs": [ - { - "name": "isValid", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "orders", - "type": "tuple[]" - }, - { - "name": "makerAssetFillAmount", - "type": "uint256" - }, - { - "name": "signatures", - "type": "bytes[]" - } - ], - "name": "marketBuyOrdersNoThrow", - "outputs": [ - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "totalFillResults", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "order", - "type": "tuple" - }, - { - "name": "takerAssetFillAmount", - "type": "uint256" - }, - { - "name": "signature", - "type": "bytes" - } - ], - "name": "fillOrder", - "outputs": [ - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "fillResults", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "salt", - "type": "uint256" - }, - { - "name": "signerAddress", - "type": "address" - }, - { - "name": "data", - "type": "bytes" - }, - { - "name": "signature", - "type": "bytes" - } - ], - "name": "executeTransaction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "assetProxy", - "type": "address" - } - ], - "name": "registerAssetProxy", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "order", - "type": "tuple" - } - ], - "name": "getOrderInfo", - "outputs": [ - { - "components": [ - { - "name": "orderStatus", - "type": "uint8" - }, - { - "name": "orderHash", - "type": "bytes32" - }, - { - "name": "orderTakerAssetFilledAmount", - "type": "uint256" - } - ], - "name": "orderInfo", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "order", - "type": "tuple" - } - ], - "name": "cancelOrder", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - }, - { - "name": "", - "type": "address" - } - ], - "name": "orderEpoch", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "ZRX_ASSET_DATA", - "outputs": [ - { - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "orders", - "type": "tuple[]" - }, - { - "name": "takerAssetFillAmount", - "type": "uint256" - }, - { - "name": "signatures", - "type": "bytes[]" - } - ], - "name": "marketSellOrdersNoThrow", - "outputs": [ - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "totalFillResults", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "EIP712_DOMAIN_HASH", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "orders", - "type": "tuple[]" - }, - { - "name": "makerAssetFillAmount", - "type": "uint256" - }, - { - "name": "signatures", - "type": "bytes[]" - } - ], - "name": "marketBuyOrders", - "outputs": [ - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "totalFillResults", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "currentContextAddress", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "VERSION", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "name": "_zrxAssetData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "signerAddress", - "type": "address" - }, - { - "indexed": true, - "name": "validatorAddress", - "type": "address" - }, - { - "indexed": false, - "name": "approved", - "type": "bool" - } - ], - "name": "SignatureValidatorApproval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "makerAddress", - "type": "address" - }, - { - "indexed": true, - "name": "feeRecipientAddress", - "type": "address" - }, - { - "indexed": false, - "name": "takerAddress", - "type": "address" - }, - { - "indexed": false, - "name": "senderAddress", - "type": "address" - }, - { - "indexed": false, - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "makerFeePaid", - "type": "uint256" - }, - { - "indexed": false, - "name": "takerFeePaid", - "type": "uint256" - }, - { - "indexed": true, - "name": "orderHash", - "type": "bytes32" - }, - { - "indexed": false, - "name": "makerAssetData", - "type": "bytes" - }, - { - "indexed": false, - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "Fill", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "makerAddress", - "type": "address" - }, - { - "indexed": true, - "name": "feeRecipientAddress", - "type": "address" - }, - { - "indexed": false, - "name": "senderAddress", - "type": "address" - }, - { - "indexed": true, - "name": "orderHash", - "type": "bytes32" - }, - { - "indexed": false, - "name": "makerAssetData", - "type": "bytes" - }, - { - "indexed": false, - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "Cancel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "makerAddress", - "type": "address" - }, - { - "indexed": true, - "name": "senderAddress", - "type": "address" - }, - { - "indexed": false, - "name": "orderEpoch", - "type": "uint256" - } - ], - "name": "CancelUpTo", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "id", - "type": "bytes4" - }, - { - "indexed": false, - "name": "assetProxy", - "type": "address" - } - ], - "name": "AssetProxyRegistered", - "type": "event" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": - "0x60806040526000805460ff191690553480156200001b57600080fd5b5060405162005ec038038062005ec083398101806040526200004191908101906200044d565b80518190620000589060019060208401906200034c565b5050604080517f454950373132446f6d61696e28000000000000000000000000000000000000006020808301919091527f737472696e67206e616d652c0000000000000000000000000000000000000000602d8301527f737472696e672076657273696f6e2c000000000000000000000000000000000060398301527f6164647265737320766572696679696e67436f6e74726163740000000000000060488301527f2900000000000000000000000000000000000000000000000000000000000000606183015282516042818403018152606290920192839052815191929182918401908083835b60208310620001625780518252601f19909201916020918201910162000141565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208285018552600b8084527f30782050726f746f636f6c000000000000000000000000000000000000000000928401928352945190965091945090928392508083835b60208310620001ec5780518252601f199092019160209182019101620001cb565b51815160209384036101000a600019018019909216911617905260408051929094018290038220828501855260018084527f3200000000000000000000000000000000000000000000000000000000000000928401928352945190965091945090928392508083835b60208310620002765780518252601f19909201916020918201910162000255565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208282019890985281840196909652606081019690965250306080808701919091528151808703909101815260a09095019081905284519093849350850191508083835b60208310620003015780518252601f199092019160209182019101620002e0565b5181516000196020949094036101000a939093019283169219169190911790526040519201829003909120600255505060038054600160a060020a03191633179055506200050f9050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200038f57805160ff1916838001178555620003bf565b82800160010185558215620003bf579182015b82811115620003bf578251825591602001919060010190620003a2565b50620003cd929150620003d1565b5090565b620003ee91905b80821115620003cd5760008155600101620003d8565b90565b6000601f820183136200040357600080fd5b81516200041a6200041482620004b4565b6200048d565b915080825260208301602083018583830111156200043757600080fd5b62000444838284620004dc565b50505092915050565b6000602082840312156200046057600080fd5b81516001604060020a038111156200047757600080fd5b6200048584828501620003f1565b949350505050565b6040518181016001604060020a0381118282101715620004ac57600080fd5b604052919050565b60006001604060020a03821115620004cb57600080fd5b506020601f91909101601f19160190565b60005b83811015620004f9578181015183820152602001620004df565b8381111562000509576000848401525b50505050565b6159a1806200051f6000396000f3006080604052600436106101b65763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663288cdc9181146101bb578063297bb70b146101f15780632ac126221461021e5780633683ef8e1461024b5780633c28d8611461026d5780633e228bae1461029a5780633fd3c997146102ba5780634ac14782146102e75780634d0ae546146103075780634f9559b11461032757806350dde190146103475780636070410814610367578063642f2eaf1461039457806364a3bc15146103b457806377fcce68146103d45780637b8e3514146103f45780637e1d9808146104145780637e9d74dc1461043457806382c174d0146104615780638da5cb5b146104815780639363470214610496578063a3e20380146104b6578063b4be83d5146104d6578063bfc8bfce146104f6578063c585bb9314610516578063c75e0a8114610536578063d46b02c314610563578063d9bfa73e14610583578063db123b1a146105a3578063dd1c7d18146105c5578063e306f779146105e5578063e5fa431b146105fa578063eea086ba1461061a578063f2fde38b1461062f578063ffa1ad741461064f575b600080fd5b3480156101c757600080fd5b506101db6101d63660046148ee565b610664565b6040516101e89190615513565b60405180910390f35b3480156101fd57600080fd5b5061021161020c366004614811565b610676565b6040516101e891906157ed565b34801561022a57600080fd5b5061023e6102393660046148ee565b6107a1565b6040516101e89190615505565b34801561025757600080fd5b5061026b61026636600461492b565b6107b6565b005b34801561027957600080fd5b5061028d610288366004614a5f565b6108a3565b6040516101e891906157fb565b3480156102a657600080fd5b506102116102b5366004614b1f565b610a3a565b3480156102c657600080fd5b506102da6102d53660046149ee565b610a90565b6040516101e891906155cf565b3480156102f357600080fd5b5061026b6103023660046147dc565b610ab8565b34801561031357600080fd5b50610211610322366004614811565b610b85565b34801561033357600080fd5b5061026b6103423660046148ee565b610c75565b34801561035357600080fd5b50610211610362366004614811565b610e2a565b34801561037357600080fd5b506103876103823660046149ee565b610ebe565b6040516101e89190615425565b3480156103a057600080fd5b5061023e6103af3660046148ee565b610f0c565b3480156103c057600080fd5b506102116103cf366004614b1f565b610f21565b3480156103e057600080fd5b5061026b6103ef3660046147ac565b610fcc565b34801561040057600080fd5b5061023e61040f366004614772565b611106565b34801561042057600080fd5b5061021161042f3660046148a5565b611126565b34801561044057600080fd5b5061045461044f3660046147dc565b61128a565b6040516101e891906154f4565b34801561046d57600080fd5b5061023e61047c36600461490c565b61131f565b34801561048d57600080fd5b5061038761133f565b3480156104a257600080fd5b5061023e6104b1366004614993565b61135b565b3480156104c257600080fd5b506102116104d13660046148a5565b6118de565b3480156104e257600080fd5b506102116104f1366004614b1f565b6119f1565b34801561050257600080fd5b5061026b610511366004614b68565b611a6c565b34801561052257600080fd5b5061026b610531366004614754565b611d05565b34801561054257600080fd5b50610556610551366004614a2a565b611f30565b6040516101e8919061580a565b34801561056f57600080fd5b5061026b61057e366004614a2a565b61202a565b34801561058f57600080fd5b506101db61059e366004614772565b6120c6565b3480156105af57600080fd5b506105b86120e3565b6040516101e891906155be565b3480156105d157600080fd5b506102116105e03660046148a5565b61218e565b3480156105f157600080fd5b506101db612263565b34801561060657600080fd5b506102116106153660046148a5565b612269565b34801561062657600080fd5b506103876123db565b34801561063b57600080fd5b5061026b61064a366004614754565b6123f7565b34801561065b57600080fd5b506105b86124a8565b60046020526000908152604090205481565b61067e614386565b600080610689614386565b60005460ff16156106cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558751935091505b81831461076f57610758878381518110151561071957fe5b90602001906020020151878481518110151561073157fe5b90602001906020020151878581518110151561074957fe5b906020019060200201516124df565b9050610764848261257d565b600190910190610701565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055509392505050565b60056020526000908152604090205460ff1681565b73ffffffffffffffffffffffffffffffffffffffff831633146108465761080e848484848080601f0160208091040260200160405190810160405280939291908181526020018383808284375061135b945050505050565b1515610846576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061569d565b5050600091825260076020908152604080842073ffffffffffffffffffffffffffffffffffffffff9093168452919052902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6108ab6143af565b6108b36143de565b6108bb6143de565b6000805460ff16156108f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561016080890151610140808a01919091528901519088015261094588611f30565b925061095087611f30565b915061095a6125df565b905061096888848389612611565b61097487838388612611565b61097e88886127a9565b610992888885604001518560400151612809565b8051602081015190519195506109ad918a9186918190612990565b6020808501519081015190516109c99189918591908190612990565b6109e28882856020015186604001518860000151612aa9565b6109fb8782846020015185604001518860200151612aa9565b610a0788888387612b55565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550949350505050565b610a42614386565b6060610a4f858585612d2d565b9050608081825160208401305af48015610a8657815183526020820151602084015260408201516040840152606082015160608401525b505b509392505050565b600b6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60008054819060ff1615610af8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558151905b808214610b5857610b508382815181101515610b4157fe5b90602001906020020151612eff565b600101610b29565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b610b8d614386565b600080610b98614386565b60005460ff1615610bd5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558751935091505b81831461076f57610c5e8783815181101515610c1f57fe5b906020019060200201518784815181101515610c3757fe5b906020019060200201518785815181101515610c4f57fe5b90602001906020020151612f2a565b9050610c6a848261257d565b600190910190610c07565b6000805481908190819060ff1615610cb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610cec6125df565b935073ffffffffffffffffffffffffffffffffffffffff84163314610d115733610d14565b60005b73ffffffffffffffffffffffffffffffffffffffff8086166000908152600660209081526040808320938516835292905220549093506001860192509050808211610d8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061572d565b73ffffffffffffffffffffffffffffffffffffffff80851660008181526006602090815260408083209488168084529490915290819020859055517f82af639571738f4ebd4268fb0363d8957ebe1bbb9e78dba5ebd69eed39b154f090610df3908690615513565b60405180910390a35050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055505050565b610e32614386565b600080610e3d614386565b86519250600091505b818314610eb457610e9d8783815181101515610e5e57fe5b906020019060200201518784815181101515610e7657fe5b906020019060200201518785815181101515610e8e57fe5b90602001906020020151610a3a565b9050610ea9848261257d565b600190910190610e46565b5050509392505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff165b919050565b60096020526000908152604090205460ff1681565b610f29614386565b60005460ff1615610f66576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610f9c848484612f2a565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055949350505050565b6000805460ff161561100a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561103d6125df565b73ffffffffffffffffffffffffffffffffffffffff8181166000818152600860209081526040808320948916808452949091529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168715151790555192935090917fa8656e308026eeabce8f0bc18048433252318ab80ac79da0b3d3d8697dfba891906110d1908690615505565b60405180910390a35050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b600860209081526000928352604080842090915290825290205460ff1681565b61112e614386565b6060600080600061113d614386565b60005460ff161561117a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117815589518a919081106111b257fe5b906020019060200201516101600151945088519350600092505b828414611255578489848151811015156111e257fe5b906020019060200201516101600181905250611202888760200151612f7d565b915061122e898481518110151561121557fe5b9060200190602002015183898681518110151561074957fe5b905061123a868261257d565b6020860151881161124a57611255565b6001909201916111cc565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055509195945050505050565b606060006060600084519250826040519080825280602002602001820160405280156112d057816020015b6112bd6143de565b8152602001906001900390816112b55790505b509150600090505b808314610a88576112ff85828151811015156112f057fe5b90602001906020020151611f30565b828281518110151561130d57fe5b602090810290910101526001016112d8565b600760209081526000928352604080842090915290825290205460ff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600080600080600089511115156113a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061571d565b6113ad89612fc4565b7f010000000000000000000000000000000000000000000000000000000000000090049650600760ff88161061140f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061563d565b8660ff16600781111561141e57fe5b9550600086600781111561142e57fe5b1415611466576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061570d565b600186600781111561147457fe5b14156114bc578851156114b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157dd565b600097506118d0565b60028660078111156114ca57fe5b141561160557885160411461150b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155dd565b88600081518110151561151a57fe5b01602001517f010000000000000000000000000000000000000000000000000000000000000090819004810204945061155a89600163ffffffff61308816565b935061156d89602163ffffffff61308816565b925060018b86868660405160008152602001604052604051611592949392919061556e565b60206040516020810390808403906000865af11580156115b6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff8c811690821614995092506118d09050565b600386600781111561161357fe5b14156117b9578851604114611654576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155dd565b88600081518110151561166357fe5b01602001517f01000000000000000000000000000000000000000000000000000000000000009081900481020494506116a389600163ffffffff61308816565b93506116b689602163ffffffff61308816565b925060018b60405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b6020831061175757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161171a565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040805192909401829003822060008352910192839052611592945092508991899150889061556e565b60048660078111156117c757fe5b14156117df576117d88b8b8b6130d3565b97506118d0565b60058660078111156117ed57fe5b1415611850576117fc89613228565b73ffffffffffffffffffffffffffffffffffffffff808c1660009081526008602090815260408083209385168352929052205490915060ff16151561184457600097506118d0565b6117d8818c8c8c6132a1565b600686600781111561185e57fe5b141561189e5760008b815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff8e16845290915290205460ff1697506118d0565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061563d565b505050505050509392505050565b6118e6614386565b60606000806000806118f6614386565b89600081518110151561190557fe5b906020019060200201516101400151955089519450600093505b8385146119e457858a8581518110151561193557fe5b6020908102909101015161014001528651611951908a90612f7d565b92506119948a8581518110151561196457fe5b9060200190602002015160a001518b8681518110151561198057fe5b9060200190602002015160800151856133fd565b91506119c08a858151811015156119a757fe5b90602001906020020151838a87815181101515610e8e57fe5b90506119cc878261257d565b865189116119d9576119e4565b60019093019261191f565b5050505050509392505050565b6119f9614386565b60005460ff1615611a36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610f9c8484846124df565b600a5460009073ffffffffffffffffffffffffffffffffffffffff1615611abf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b611b02611afd888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843750613453945050505050565b613694565b60008181526009602052604090205490915060ff1615611b4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061568d565b73ffffffffffffffffffffffffffffffffffffffff86163314611c1f57611ba6818785858080601f0160208091040260200160405190810160405280939291908181526020018383808284375061135b945050505050565b1515611bde576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157cd565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff88161790555b6000818152600960205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555130908690869080838380828437820191505092505050600060405180830381855af49150501515611cb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156bd565b73ffffffffffffffffffffffffffffffffffffffff86163314611cfc57600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b50505050505050565b6003546000908190819073ffffffffffffffffffffffffffffffffffffffff163314611d5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061577d565b8392508273ffffffffffffffffffffffffffffffffffffffff1663ae25532e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611dc457600080fd5b505af1158015611dd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611dfc9190810190614a0c565b7fffffffff0000000000000000000000000000000000000000000000000000000081166000908152600b602052604090205490925073ffffffffffffffffffffffffffffffffffffffff1690508015611e81576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061561d565b7fffffffff0000000000000000000000000000000000000000000000000000000082166000908152600b60205260409081902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8616179055517fd2c6b762299c609bdb96520b58a49bfb80186934d4f71a86a367571a15c0319490611f2290849087906155a3565b60405180910390a150505050565b611f386143de565b611f41826136d1565b6020808301829052600091825260049052604090819020549082015260808201511515611f755760015b60ff168152610f07565b60a08201511515611f87576002611f6b565b60a0820151604082015110611f9d576005611f6b565b6101008201514210611fb0576004611f6b565b60208082015160009081526005909152604090205460ff1615611fd4576006611f6b565b610120820151825173ffffffffffffffffffffffffffffffffffffffff90811660009081526006602090815260408083206060880151909416835292905220541115612021576006611f6b565b60038152919050565b60005460ff1615612067576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561209b81612eff565b50600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600660209081526000928352604080842090915290825290205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156121865780601f1061215b57610100808354040283529160200191612186565b820191906000526020600020905b81548152906001019060200180831161216957829003601f168201915b505050505081565b612196614386565b606060008060006121a5614386565b8860008151811015156121b457fe5b906020019060200201516101600151945088519350600092505b828414612257578489848151811015156121e457fe5b906020019060200201516101600181905250612204888760200151612f7d565b9150612230898481518110151561221757fe5b90602001906020020151838986815181101515610e8e57fe5b905061223c868261257d565b6020860151881161224c57612257565b6001909201916121ce565b50505050509392505050565b60025481565b612271614386565b6060600080600080612281614386565b60005460ff16156122be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558a518b919081106122f657fe5b906020019060200201516101400151955089519450600093505b8385146123a557858a8581518110151561232657fe5b6020908102909101015161014001528651612342908a90612f7d565b92506123558a8581518110151561196457fe5b91506123818a8581518110151561236857fe5b90602001906020020151838a8781518110151561074957fe5b905061238d878261257d565b8651891161239a576123a5565b600190930192612310565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550929695505050505050565b600a5473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff163314612448576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061577d565b73ffffffffffffffffffffffffffffffffffffffff8116156124a557600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b60408051808201909152600581527f322e302e30000000000000000000000000000000000000000000000000000000602082015281565b6124e7614386565b6124ef6143de565b60008060006124fd88611f30565b93506125076125df565b925061251588858589612611565b6125278860a001518560400151612f7d565b915061253387836136df565b9050612546888589848960000151612990565b61255088826136f5565b945061256788848660200151876040015189612aa9565b612572888487613756565b505050509392505050565b8151815161258b9190613864565b8252602080830151908201516125a19190613864565b6020830152604080830151908201516125ba9190613864565b6040830152606080830151908201516125d39190613864565b60609092019190915250565b600a5460009073ffffffffffffffffffffffffffffffffffffffff16818115612608578161260a565b335b9392505050565b825160ff1660031461264f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061579d565b606084015173ffffffffffffffffffffffffffffffffffffffff16156126c257606084015173ffffffffffffffffffffffffffffffffffffffff1633146126c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157ad565b602084015173ffffffffffffffffffffffffffffffffffffffff161561274d578173ffffffffffffffffffffffffffffffffffffffff16846020015173ffffffffffffffffffffffffffffffffffffffff1614151561274d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155ed565b604083015115156127a35761276b836020015185600001518361135b565b15156127a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061565d565b50505050565b6127bb8260a001518260a001516138ae565b6127cd836080015183608001516138ae565b1015612805576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157bd565b5050565b6128116143af565b6000806000806128258960a0015188612f7d565b935061283a89608001518a60a0015186613909565b925061284a8860a0015187612f7d565b915061285f88608001518960a0015184613909565b90508084106128a25760208086018051839052805182018490525151865182015260808a015160a08b015187519092015161289a9290613909565b8551526128df565b845183905284516020908101859052855181015190860180519190915260a089015160808a01519151516128d69290613986565b60208087015101525b84515160208087015101516128f49190612f7d565b604086015284515160808a015160c08b0151612911929190613909565b85516040015284516020015160a08a015160e08b0151612932929190613909565b855160600152602085015151608089015160c08a0151612953929190613909565b8560200151604001818152505061297b8560200151602001518960a001518a60e00151613909565b60208601516060015250505050949350505050565b8215156129c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156dd565b82821115612a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156cd565b8460a00151612a16856040015184613864565b1115612a4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155fd565b612a5c8560800151836138ae565b612a6a828760a001516138ae565b1115612aa2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061575d565b5050505050565b612ab7828260200151613864565b600084815260046020908152604091829020929092558681015187518451938501518584015160608701516101408c01516101608d015196518b9873ffffffffffffffffffffffffffffffffffffffff9788169897909616967f0bcc4c97732e47d9946f229edb95f5b6323f601300e4690de719993f3c37112996612b46968f96339692959194909390615433565b60405180910390a45050505050565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101008789161502019095169490940493840181900481028201810190925282815260609390929091830182828015612bfe5780601f10612bd357610100808354040283529160200191612bfe565b820191906000526020600020905b815481529060010190602001808311612be157829003601f168201915b50505050509050612c2685610140015186600001518660000151856020015160200151613a23565b61014084015184518651845160200151612c4293929190613a23565b612c5b8561014001518660000151858560400151613a23565b612c778186600001518760400151856000015160400151613a23565b612c938185600001518660400151856020015160400151613a23565b836040015173ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff161415612cfd57612cf881848760400151612cf3866000015160600151876020015160600151613864565b613a23565b612aa2565b612d1581848760400151856000015160600151613a23565b612aa281848660400151856020015160600151613a23565b604080517fb4be83d5000000000000000000000000000000000000000000000000000000006020808301919091526060602483018181528751608485019081528884015160a48601529488015160c48501529087015160e4840152608087015161010484015260a087015161012484015260c087015161014484015260e08701516101648401526101008701516101848401526101208701516101a4840152610140870180516101c485019081526101608901516101e4860152610180905251805161020485018190529394919384936044870192849261022489019291820191601f82010460005b81811015612e34578351855260209485019490930192600101612e16565b50505050818103610160808401919091528a0151805180835260209283019291820191601f82010460005b81811015612e7d578351855260209485019490930192600101612e5f565b50505089845250848103602093840190815288518083529093918201918981019190601f82010460005b81811015612ec5578351855260209485019490930192600101612ea7565b5050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08883030188525060405250505050509392505050565b612f076143de565b612f1082611f30565b9050612f1c8282613bed565b612805828260200151613d04565b612f32614386565b612f3d8484846124df565b6020810151909150831461260a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061574d565b600082821115612fb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061560d565b508082035b92915050565b6000808251111515613002576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156fd565b815182907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061303257fe5b016020015182517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909252507f0100000000000000000000000000000000000000000000000000000000000000908190040290565b6000816020018351101515156130ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061562d565b50016020015190565b6040516000906060907f1626ba7e000000000000000000000000000000000000000000000000000000009061310e908790869060240161554e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093178352815191935090829081885afa8080156131ab576001811461321c57612572565b7f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0c57414c4c45545f4552524f5200000000000000000000000000000000604052600060605260646000fd5b50505195945050505050565b60006014825110151515613268576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061578d565b613276826014845103613dab565b82517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec019092525090565b6040516000906060907f9363470200000000000000000000000000000000000000000000000000000000906132de90879087908790602401615521565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931783528151919350908290818a5afa80801561337b57600181146133ec576133f1565b7f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f56414c494441544f525f4552524f5200000000000000000000000000604052600060605260646000fd5b825194505b50505050949350505050565b6000808311613438576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b61344b61344585846138ae565b84613e0c565b949350505050565b604080517f5a65726f45785472616e73616374696f6e2800000000000000000000000000006020808301919091527f75696e743235362073616c742c0000000000000000000000000000000000000060328301527f61646472657373207369676e6572416464726573732c00000000000000000000603f8301527f627974657320646174610000000000000000000000000000000000000000000060558301527f2900000000000000000000000000000000000000000000000000000000000000605f830152825180830384018152606090920192839052815160009384938493909282918401908083835b6020831061357c57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161353f565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617905260405191909301819003812089519097508995509093508392850191508083835b6020831061361257805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016135d5565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040805192909401829003822097825281019a909a525073ffffffffffffffffffffffffffffffffffffffff97909716968801969096525050606085015250506080909120919050565b600280546040517f190100000000000000000000000000000000000000000000000000000000000081529182015260228101919091526042902090565b6000612fbe611afd83613e23565b60008183106136ee578161260a565b5090919050565b6136fd614386565b6020810182905260a08301516080840151613719918491613909565b808252608084015160c0850151613731929190613909565b604082015260a083015160e084015161374b918491613909565b606082015292915050565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156137ff5780601f106137d4576101008083540402835291602001916137ff565b820191906000526020600020905b8154815290600101906020018083116137e257829003601f168201915b5050505050905061381f8461014001518560000151858560000151613a23565b6138388461016001518486600001518560200151613a23565b61385081856000015186604001518560400151613a23565b6127a3818486604001518560600151613a23565b6000828201838110156138a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567d565b8091505b5092915050565b6000808315156138c157600091506138a7565b508282028284828115156138d157fe5b04146138a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567d565b6000808311613944576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b61394f84848461427c565b15613438576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156ad565b60008083116139c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b6139cc848484614301565b15613a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156ad565b61344b613445613a1386856138ae565b613a1e866001612f7d565b613864565b600080600083118015613a6257508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15613be5578551600310613aa2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061573d565b50506020848101517fffffffff00000000000000000000000000000000000000000000000000000000166000818152600b90925260409091205473ffffffffffffffffffffffffffffffffffffffff16801515613b2b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156ed565b604051660fffffffffffe0603f885101168060840182017fa85e59e40000000000000000000000000000000000000000000000000000000083526080600484015273ffffffffffffffffffffffffffffffffffffffff8816602484015273ffffffffffffffffffffffffffffffffffffffff87166044840152856064840152608483015b81811015613bc757895181526020998a019901613baf565b61020084858403866000895af1801515613bdf573d85fd5b50505050505b505050505050565b805160009060ff16600314613c2e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061579d565b606083015173ffffffffffffffffffffffffffffffffffffffff1615613ca157606083015173ffffffffffffffffffffffffffffffffffffffff163314613ca1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157ad565b613ca96125df565b835190915073ffffffffffffffffffffffffffffffffffffffff808316911614613cff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061566d565b505050565b6000818152600560205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558281015183516101408501516101608601519351859473ffffffffffffffffffffffffffffffffffffffff9485169493909316927fdc47b3613d9fe400085f6dbdc99453462279057e6207385042827ed6b1a62cf792613d9f923392906154b7565b60405180910390a45050565b600081601401835110151515613ded576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061578d565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b6000808284811515613e1a57fe5b04949350505050565b604080517f4f726465722800000000000000000000000000000000000000000000000000006020808301919091527f61646472657373206d616b6572416464726573732c000000000000000000000060268301527f616464726573732074616b6572416464726573732c0000000000000000000000603b8301527f6164647265737320666565526563697069656e74416464726573732c0000000060508301527f616464726573732073656e646572416464726573732c00000000000000000000606c8301527f75696e74323536206d616b65724173736574416d6f756e742c0000000000000060828301527f75696e743235362074616b65724173736574416d6f756e742c00000000000000609b8301527f75696e74323536206d616b65724665652c00000000000000000000000000000060b48301527f75696e743235362074616b65724665652c00000000000000000000000000000060c58301527f75696e743235362065787069726174696f6e54696d655365636f6e64732c000060d68301527f75696e743235362073616c742c0000000000000000000000000000000000000060f48301527f6279746573206d616b65724173736574446174612c00000000000000000000006101018301527f62797465732074616b65724173736574446174610000000000000000000000006101168301527f290000000000000000000000000000000000000000000000000000000000000061012a830152825161010b81840301815261012b90920192839052815160009384938493849391929182918401908083835b602083106140ab57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161406e565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930181900381206101408b0151805191995095509093508392850191508083835b6020831061414657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101614109565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930181900381206101608b0151805191985095509093508392850191508083835b602083106141e157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016141a4565b5181516020939093036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909116921691909117905260405192018290039091207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0890180516101408b018051610160909c0180519a84529881529288526101a0822091529890525050509190525090919050565b6000808084116142b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b8215806142c3575084155b156142d15760009150610a88565b838015156142db57fe5b85840990506142ea85846138ae565b6142f66103e8836138ae565b101595945050505050565b60008080841161433d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b821580614348575084155b156143565760009150610a88565b8380151561436057fe5b8584099050836143708583612f7d565b81151561437957fe5b0690506142ea85846138ae565b608060405190810160405280600081526020016000815260200160008152602001600081525090565b610120604051908101604052806143c4614386565b81526020016143d1614386565b8152602001600081525090565b604080516060810182526000808252602082018190529181019190915290565b600061260a82356158b0565b6000601f8201831361441b57600080fd5b813561442e6144298261583f565b615818565b81815260209384019390925082018360005b8381101561446c578135860161445688826145bc565b8452506020928301929190910190600101614440565b5050505092915050565b6000601f8201831361448757600080fd5b81356144956144298261583f565b81815260209384019390925082018360005b8381101561446c57813586016144bd888261460b565b84525060209283019291909101906001016144a7565b6000601f820183136144e457600080fd5b81356144f26144298261583f565b9150818183526020840193506020810190508385602084028201111561451757600080fd5b60005b8381101561446c578161452d888261454f565b845250602092830192919091019060010161451a565b600061260a82356158c9565b600061260a82356158ce565b600061260a82356158d1565b600061260a82516158d1565b600080601f8301841361458557600080fd5b50813567ffffffffffffffff81111561459d57600080fd5b6020830191508360018202830111156145b557600080fd5b9250929050565b6000601f820183136145cd57600080fd5b81356145db61442982615860565b915080825260208301602083018583830111156145f757600080fd5b614602838284615907565b50505092915050565b6000610180828403121561461e57600080fd5b614629610180615818565b9050600061463784846143fe565b8252506020614648848483016143fe565b602083015250604061465c848285016143fe565b6040830152506060614670848285016143fe565b60608301525060806146848482850161454f565b60808301525060a06146988482850161454f565b60a08301525060c06146ac8482850161454f565b60c08301525060e06146c08482850161454f565b60e0830152506101006146d58482850161454f565b610100830152506101206146eb8482850161454f565b6101208301525061014082013567ffffffffffffffff81111561470d57600080fd5b614719848285016145bc565b6101408301525061016082013567ffffffffffffffff81111561473b57600080fd5b614747848285016145bc565b6101608301525092915050565b60006020828403121561476657600080fd5b600061344b84846143fe565b6000806040838503121561478557600080fd5b600061479185856143fe565b92505060206147a2858286016143fe565b9150509250929050565b600080604083850312156147bf57600080fd5b60006147cb85856143fe565b92505060206147a285828601614543565b6000602082840312156147ee57600080fd5b813567ffffffffffffffff81111561480557600080fd5b61344b84828501614476565b60008060006060848603121561482657600080fd5b833567ffffffffffffffff81111561483d57600080fd5b61484986828701614476565b935050602084013567ffffffffffffffff81111561486657600080fd5b614872868287016144d3565b925050604084013567ffffffffffffffff81111561488f57600080fd5b61489b8682870161440a565b9150509250925092565b6000806000606084860312156148ba57600080fd5b833567ffffffffffffffff8111156148d157600080fd5b6148dd86828701614476565b93505060206148728682870161454f565b60006020828403121561490057600080fd5b600061344b848461454f565b6000806040838503121561491f57600080fd5b6000614791858561454f565b6000806000806060858703121561494157600080fd5b600061494d878761454f565b945050602061495e878288016143fe565b935050604085013567ffffffffffffffff81111561497b57600080fd5b61498787828801614573565b95989497509550505050565b6000806000606084860312156149a857600080fd5b60006149b4868661454f565b93505060206149c5868287016143fe565b925050604084013567ffffffffffffffff8111156149e257600080fd5b61489b868287016145bc565b600060208284031215614a0057600080fd5b600061344b848461455b565b600060208284031215614a1e57600080fd5b600061344b8484614567565b600060208284031215614a3c57600080fd5b813567ffffffffffffffff811115614a5357600080fd5b61344b8482850161460b565b60008060008060808587031215614a7557600080fd5b843567ffffffffffffffff811115614a8c57600080fd5b614a988782880161460b565b945050602085013567ffffffffffffffff811115614ab557600080fd5b614ac18782880161460b565b935050604085013567ffffffffffffffff811115614ade57600080fd5b614aea878288016145bc565b925050606085013567ffffffffffffffff811115614b0757600080fd5b614b13878288016145bc565b91505092959194509250565b600080600060608486031215614b3457600080fd5b833567ffffffffffffffff811115614b4b57600080fd5b614b578682870161460b565b93505060206149c58682870161454f565b60008060008060008060808789031215614b8157600080fd5b6000614b8d898961454f565b9650506020614b9e89828a016143fe565b955050604087013567ffffffffffffffff811115614bbb57600080fd5b614bc789828a01614573565b9450945050606087013567ffffffffffffffff811115614be657600080fd5b614bf289828a01614573565b92509250509295509295509295565b614c0a816158b0565b82525050565b6000614c1b826158ac565b808452602084019350614c2d836158a6565b60005b82811015614c5d57614c438683516153e5565b614c4c826158a6565b606096909601959150600101614c30565b5093949350505050565b614c0a816158c9565b614c0a816158ce565b614c0a816158d1565b6000614c8d826158ac565b808452614ca1816020860160208601615913565b614caa8161593f565b9093016020019392505050565b614c0a816158fc565b601281527f4c454e4754485f36355f52455155495245440000000000000000000000000000602082015260400190565b600d81527f494e56414c49445f54414b455200000000000000000000000000000000000000602082015260400190565b600e81527f4f524445525f4f56455246494c4c000000000000000000000000000000000000602082015260400190565b601181527f55494e543235365f554e444552464c4f57000000000000000000000000000000602082015260400190565b601a81527f41535345545f50524f58595f414c52454144595f455849535453000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601581527f5349474e41545552455f554e535550504f525445440000000000000000000000602082015260400190565b601081527f4449564953494f4e5f42595f5a45524f00000000000000000000000000000000602082015260400190565b601781527f494e56414c49445f4f524445525f5349474e4154555245000000000000000000602082015260400190565b600d81527f494e56414c49445f4d414b455200000000000000000000000000000000000000602082015260400190565b601081527f55494e543235365f4f564552464c4f5700000000000000000000000000000000602082015260400190565b600f81527f494e56414c49445f54585f484153480000000000000000000000000000000000602082015260400190565b601181527f494e56414c49445f5349474e4154555245000000000000000000000000000000602082015260400190565b600e81527f524f554e44494e475f4552524f52000000000000000000000000000000000000602082015260400190565b601081527f4641494c45445f455845435554494f4e00000000000000000000000000000000602082015260400190565b600d81527f54414b45525f4f56455250415900000000000000000000000000000000000000602082015260400190565b601481527f494e56414c49445f54414b45525f414d4f554e54000000000000000000000000602082015260400190565b601a81527f41535345545f50524f58595f444f45535f4e4f545f4558495354000000000000602082015260400190565b602181527f475245415445525f5448414e5f5a45524f5f4c454e4754485f5245515549524560208201527f4400000000000000000000000000000000000000000000000000000000000000604082015260600190565b601181527f5349474e41545552455f494c4c4547414c000000000000000000000000000000602082015260400190565b601e81527f4c454e4754485f475245415445525f5448414e5f305f52455155495245440000602082015260400190565b601781527f494e56414c49445f4e45575f4f524445525f45504f4348000000000000000000602082015260400190565b601e81527f4c454e4754485f475245415445525f5448414e5f335f52455155495245440000602082015260400190565b601481527f434f4d504c4554455f46494c4c5f4641494c4544000000000000000000000000602082015260400190565b601281527f494e56414c49445f46494c4c5f50524943450000000000000000000000000000602082015260400190565b601281527f5245454e5452414e43595f494c4c4547414c0000000000000000000000000000602082015260400190565b601381527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f32305f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601081527f4f524445525f554e46494c4c41424c4500000000000000000000000000000000602082015260400190565b600e81527f494e56414c49445f53454e444552000000000000000000000000000000000000602082015260400190565b601881527f4e454741544956455f5350524541445f52455155495245440000000000000000602082015260400190565b601481527f494e56414c49445f54585f5349474e4154555245000000000000000000000000602082015260400190565b601181527f4c454e4754485f305f5245515549524544000000000000000000000000000000602082015260400190565b805160808301906153738482614c70565b5060208201516153866020850182614c70565b5060408201516153996040850182614c70565b5060608201516127a36060850182614c70565b80516101208301906153be8482615362565b5060208201516153d16080850182615362565b5060408201516127a3610100850182614c70565b805160608301906153f6848261541c565b5060208201516154096020850182614c70565b5060408201516127a36040850182614c70565b614c0a816158f6565b60208101612fbe8284614c01565b6101008101615442828b614c01565b61544f602083018a614c01565b61545c6040830189614c70565b6154696060830188614c70565b6154766080830187614c70565b61548360a0830186614c70565b81810360c08301526154958185614c82565b905081810360e08301526154a98184614c82565b9a9950505050505050505050565b606081016154c58286614c01565b81810360208301526154d78185614c82565b905081810360408301526154eb8184614c82565b95945050505050565b6020808252810161260a8184614c10565b60208101612fbe8284614c67565b60208101612fbe8284614c70565b6060810161552f8286614c70565b61553c6020830185614c01565b81810360408301526154eb8184614c82565b6040810161555c8285614c70565b818103602083015261344b8184614c82565b6080810161557c8287614c70565b615589602083018661541c565b6155966040830185614c70565b6154eb6060830184614c70565b604081016155b18285614c79565b61260a6020830184614c01565b6020808252810161260a8184614c82565b60208101612fbe8284614cb7565b60208082528101612fbe81614cc0565b60208082528101612fbe81614cf0565b60208082528101612fbe81614d20565b60208082528101612fbe81614d50565b60208082528101612fbe81614d80565b60208082528101612fbe81614db0565b60208082528101612fbe81614e06565b60208082528101612fbe81614e36565b60208082528101612fbe81614e66565b60208082528101612fbe81614e96565b60208082528101612fbe81614ec6565b60208082528101612fbe81614ef6565b60208082528101612fbe81614f26565b60208082528101612fbe81614f56565b60208082528101612fbe81614f86565b60208082528101612fbe81614fb6565b60208082528101612fbe81614fe6565b60208082528101612fbe81615016565b60208082528101612fbe81615046565b60208082528101612fbe8161509c565b60208082528101612fbe816150cc565b60208082528101612fbe816150fc565b60208082528101612fbe8161512c565b60208082528101612fbe8161515c565b60208082528101612fbe8161518c565b60208082528101612fbe816151bc565b60208082528101612fbe816151ec565b60208082528101612fbe8161521c565b60208082528101612fbe81615272565b60208082528101612fbe816152a2565b60208082528101612fbe816152d2565b60208082528101612fbe81615302565b60208082528101612fbe81615332565b60808101612fbe8284615362565b6101208101612fbe82846153ac565b60608101612fbe82846153e5565b60405181810167ffffffffffffffff8111828210171561583757600080fd5b604052919050565b600067ffffffffffffffff82111561585657600080fd5b5060209081020190565b600067ffffffffffffffff82111561587757600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60200190565b5190565b73ffffffffffffffffffffffffffffffffffffffff1690565b151590565b90565b7fffffffff000000000000000000000000000000000000000000000000000000001690565b60ff1690565b6000612fbe826158b0565b82818337506000910152565b60005b8381101561592e578181015183820152602001615916565b838111156127a35750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905600a265627a7a72305820d41ee66f45c4d1637cb6e5f109447c6d5d7fef3204a685dc442151c0f029b7da6c6578706572696d656e74616cf50037" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/artifacts/Forwarder.json b/packages/contract-artifacts/artifacts/Forwarder.json deleted file mode 100644 index a7bd62f8e..000000000 --- a/packages/contract-artifacts/artifacts/Forwarder.json +++ /dev/null @@ -1,447 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "Forwarder", - "compilerOutput": { - "abi": [ - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "orders", - "type": "tuple[]" - }, - { - "name": "makerAssetFillAmount", - "type": "uint256" - }, - { - "name": "signatures", - "type": "bytes[]" - }, - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "feeOrders", - "type": "tuple[]" - }, - { - "name": "feeSignatures", - "type": "bytes[]" - }, - { - "name": "feePercentage", - "type": "uint256" - }, - { - "name": "feeRecipient", - "type": "address" - } - ], - "name": "marketBuyOrdersWithEth", - "outputs": [ - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "orderFillResults", - "type": "tuple" - }, - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "feeOrderFillResults", - "type": "tuple" - } - ], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "assetData", - "type": "bytes" - }, - { - "name": "amount", - "type": "uint256" - } - ], - "name": "withdrawAsset", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "orders", - "type": "tuple[]" - }, - { - "name": "signatures", - "type": "bytes[]" - }, - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "feeOrders", - "type": "tuple[]" - }, - { - "name": "feeSignatures", - "type": "bytes[]" - }, - { - "name": "feePercentage", - "type": "uint256" - }, - { - "name": "feeRecipient", - "type": "address" - } - ], - "name": "marketSellOrdersWithEth", - "outputs": [ - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "orderFillResults", - "type": "tuple" - }, - { - "components": [ - { - "name": "makerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "takerAssetFilledAmount", - "type": "uint256" - }, - { - "name": "makerFeePaid", - "type": "uint256" - }, - { - "name": "takerFeePaid", - "type": "uint256" - } - ], - "name": "feeOrderFillResults", - "type": "tuple" - } - ], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "name": "_exchange", - "type": "address" - }, - { - "name": "_zrxAssetData", - "type": "bytes" - }, - { - "name": "_wethAssetData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "0x60806040523480156200001157600080fd5b5060405162002d2c38038062002d2c83398101806040526200003791908101906200051d565b6000805433600160a060020a031991821617825560018054909116600160a060020a0386161790558251849084908490849081906200007e906004906020870190620003d0565b50825162000094906005906020860190620003d0565b50620000b0836010640100000000620019476200036f82021704565b9150620000cd846010640100000000620019476200036f82021704565b60028054600160a060020a03948516600160a060020a031991821617909155600380549285169290911691909117905550600154604080517f4552433230546f6b656e28616464726573732900000000000000000000000000815290519081900360130181207f6070410800000000000000000000000000000000000000000000000000000000825291909216945063607041089350620001739250906004016200068e565b602060405180830381600087803b1580156200018e57600080fd5b505af1158015620001a3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250620001c99190810190620004f4565b9050600160a060020a038116151562000219576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200021090620006b0565b60405180910390fd5b6002546040517f095ea7b3000000000000000000000000000000000000000000000000000000008152600160a060020a039091169063095ea7b39062000268908490600019906004016200066f565b602060405180830381600087803b1580156200028357600080fd5b505af115801562000298573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250620002be9190810190620005a1565b506003546040517f095ea7b3000000000000000000000000000000000000000000000000000000008152600160a060020a039091169063095ea7b3906200030e908490600019906004016200066f565b602060405180830381600087803b1580156200032957600080fd5b505af11580156200033e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250620003649190810190620005a1565b50505050506200077a565b600081601401835110151515620003b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000210906200069e565b506014818301810151910190600160a060020a03165b92915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200041357805160ff191683800117855562000443565b8280016001018555821562000443579182015b828111156200044357825182559160200191906001019062000426565b506200045192915062000455565b5090565b6200047291905b808211156200045157600081556001016200045c565b90565b600062000483825162000711565b9392505050565b600062000483825162000742565b6000601f82018313620004aa57600080fd5b8151620004c1620004bb82620006e9565b620006c2565b91508082526020830160208301858383011115620004de57600080fd5b620004eb83828462000747565b50505092915050565b6000602082840312156200050757600080fd5b600062000515848462000475565b949350505050565b6000806000606084860312156200053357600080fd5b600062000541868662000475565b93505060208401516001604060020a038111156200055e57600080fd5b6200056c8682870162000498565b92505060408401516001604060020a038111156200058957600080fd5b620005978682870162000498565b9150509250925092565b600060208284031215620005b457600080fd5b60006200051584846200048a565b620005cd8162000711565b82525050565b620005cd816200071d565b602681527f475245415445525f4f525f455155414c5f544f5f32305f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601881527f554e524547495354455245445f41535345545f50524f58590000000000000000602082015260400190565b620005cd8162000472565b604081016200067f8285620005c2565b62000483602083018462000664565b60208101620003ca8284620005d3565b60208082528101620003ca81620005de565b60208082528101620003ca8162000634565b6040518181016001604060020a0381118282101715620006e157600080fd5b604052919050565b60006001604060020a038211156200070057600080fd5b506020601f91909101601f19160190565b600160a060020a031690565b7fffffffff000000000000000000000000000000000000000000000000000000001690565b151590565b60005b83811015620007645781810151838201526020016200074a565b8381111562000774576000848401525b50505050565b6125a2806200078a6000396000f30060806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318978e8281146100c8578063630f1e6c146100f25780638da5cb5b146101125780639395525c14610134578063f2fde38b14610147575b60025473ffffffffffffffffffffffffffffffffffffffff1633146100c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd90612388565b60405180910390fd5b005b6100db6100d6366004611df1565b610167565b6040516100e9929190612488565b60405180910390f35b3480156100fe57600080fd5b506100c661010d366004611eec565b6102f7565b34801561011e57600080fd5b50610127610388565b6040516100e99190612337565b6100db610142366004611d0b565b6103a4565b34801561015357600080fd5b506100c6610162366004611ce5565b61050a565b61016f6119fa565b6101776119fa565b6000806101826105bb565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610100600188161502019095169490940493840181900481028201810190925282815261025c939092909183018282801561022d5780601f106102025761010080835404028352916020019161022d565b820191906000526020600020905b81548152906001019060200180831161021057829003601f168201915b50505050508c600081518110151561024157fe5b6020908102909101015161014001519063ffffffff61069616565b156102875761026c8b8b8b6107c3565b935061028084600001518560600151610ac1565b90506102ae565b6102928b8b8b610b03565b9350836060015191506102a68883896107c3565b845190935090505b6102c2846020015184602001518888610d15565b6102e98b60008151811015156102d457fe5b90602001906020020151610140015182610f29565b505097509795505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610348576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd90612438565b61038383838080601f01602080910402602001604051908101604052809392919081815260200183838082843750879450610f299350505050565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6103ac6119fa565b6103b46119fa565b60008060006103c16105bb565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152610441939092909183018282801561022d5780601f106102025761010080835404028352916020019161022d565b156104925761046a670de0b6b3a7640000610464670de0b6b3a76400008a611045565b3461108f565b92506104778b848c6110e7565b945061048b85600001518660600151610ac1565b90506104d6565b6104ad670d2f13f7789f0000670de0b6b3a76400003461108f565b92506104ba8b848c6110e7565b9450846060015191506104ce89838a6107c3565b855190945090505b6104ea856020015185602001518989610d15565b6104fc8b60008151811015156102d457fe5b505050965096945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461055b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd90612438565b73ffffffffffffffffffffffffffffffffffffffff8116156105b857600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b600034116105f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd90612398565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016000604051808303818588803b15801561067b57600080fd5b505af115801561068f573d6000803e3d6000fd5b5050505050565b6000815183511480156107ba5750816040518082805190602001908083835b602083106106f257805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016106b5565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0180199092169116179052604051919093018190038120885190955088945090928392508401908083835b6020831061078757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161074a565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060001916145b90505b92915050565b6107cb6119fa565b60608060008060008060006107de6119fa565b8a15156107ea57610ab2565b6004805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f8101849004840282018401909252818152929183018282801561088e5780601f106108635761010080835404028352916020019161088e565b820191906000526020600020905b81548152906001019060200180831161087157829003601f168201915b505060058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152969e509194509250840190508282801561093d5780601f106109125761010080835404028352916020019161093d565b820191906000526020600020905b81548152906001019060200180831161092057829003601f168201915b50505050509650600095508b519450600093505b838514610a7857878c8581518110151561096757fe5b6020908102909101015161014001528b5187908d908690811061098657fe5b60209081029091010151610160015261099f8b87610ac1565b9250610a068c858151811015156109b257fe5b9060200190602002015160a00151610a008e878151811015156109d157fe5b90602001906020020151608001518f888151811015156109ed57fe5b9060200190602002015160e00151610ac1565b8561128b565b9150610a418c85815181101515610a1957fe5b90602001906020020151838c87815181101515610a3257fe5b906020019060200201516112e6565b9050610a4d898261135e565b610a5f89600001518a60600151610ac1565b95508a8610610a6d57610a78565b600190930192610951565b8a861015610ab2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd90612418565b50505050505050509392505050565b600082821115610afd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd906123b8565b50900390565b610b0b6119fa565b606080600080600080610b1c6119fa565b60008b6000815181101515610b2d57fe5b6020908102919091018101516101400151600580546040805160026001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190931692909204601f8101869004860283018601909152808252929b5092909190830182828015610be55780601f10610bba57610100808354040283529160200191610be5565b820191906000526020600020905b815481529060010190602001808311610bc857829003601f168201915b505050505096508b519550600094505b848614610cdb57878c86815181101515610c0b57fe5b6020908102909101015161014001528b5187908d9087908110610c2a57fe5b6020908102909101015161016001528851610c46908c90610ac1565b9350610c898c86815181101515610c5957fe5b9060200190602002015160a001518d87815181101515610c7557fe5b90602001906020020151608001518661128b565b9250610cb58c86815181101515610c9c57fe5b90602001906020020151848c88815181101515610a3257fe5b9150610cc1898361135e565b5087518a8110610cd057610cdb565b600190940193610bf5565b8a811015610ab2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd90612418565b600080808066b1a2bc2ec50000861115610d5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd90612448565b610d658888611045565b935034841115610da1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd906123a8565b610dab3485610ac1565b9250610dc086670de0b6b3a76400008a61108f565b915082821115610dfc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd90612428565b6000831115610f1f576002546040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690632e1a7d4d90610e5b9086906004016124a4565b600060405180830381600087803b158015610e7557600080fd5b505af1158015610e89573d6000803e3d6000fd5b505050506000821115610edb5760405173ffffffffffffffffffffffffffffffffffffffff86169083156108fc029084906000818181858888f19350505050158015610ed9573d6000803e3d6000fd5b505b610ee58383610ac1565b90506000811115610f1f57604051339082156108fc029083906000818181858888f19350505050158015610f1d573d6000803e3d6000fd5b505b5050505050505050565b6000610f3b838263ffffffff6113c016565b604080517f4552433230546f6b656e28616464726573732900000000000000000000000000815290519081900360130190209091507fffffffff0000000000000000000000000000000000000000000000000000000080831691161415610fab57610fa6838361142d565b610383565b604080517f455243373231546f6b656e28616464726573732c75696e7432353629000000008152905190819003601c0190207fffffffff000000000000000000000000000000000000000000000000000000008281169116141561101357610fa6838361161b565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd906123f8565b600082820183811015611084576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd906123e8565b8091505b5092915050565b60008083116110ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd906123d8565b6110dd6110d78584611703565b8461175e565b90505b9392505050565b6110ef6119fa565b60608060008060006110ff6119fa565b89600081518110151561110e57fe5b6020908102919091018101516101400151600580546040805160026001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190931692909204601f8101869004860283018601909152808252929950929091908301828280156111c65780601f1061119b576101008083540402835291602001916111c6565b820191906000526020600020905b8154815290600101906020018083116111a957829003601f168201915b5050505050945089519350600092505b82841461127e57858a848151811015156111ec57fe5b602090810290910101516101400152895185908b908590811061120b57fe5b90602001906020020151610160018190525061122b898860200151610ac1565b91506112578a8481518110151561123e57fe5b90602001906020020151838a86815181101515610a3257fe5b9050611263878261135e565b602087015189116112735761127e565b6001909201916111d6565b5050505050509392505050565b60008083116112c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd906123d8565b6110dd6110d76112d68685611703565b6112e1866001610ac1565b611045565b6112ee6119fa565b606060006112fd868686611775565b600154815191935073ffffffffffffffffffffffffffffffffffffffff1691506080908390602082016000855af1801561135457825184526020830151602085015260408301516040850152606083015160608501525b5050509392505050565b8151815161136c9190611045565b8252602080830151908201516113829190611045565b60208301526040808301519082015161139b9190611045565b6040830152606080830151908201516113b49190611045565b60609092019190915250565b600081600401835110151515611402576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd90612468565b5001602001517fffffffff000000000000000000000000000000000000000000000000000000001690565b60008061144184601063ffffffff61194716565b604080517f7472616e7366657228616464726573732c75696e7432353629000000000000008152905190819003601901812091935073ffffffffffffffffffffffffffffffffffffffff8416919061149f903390879060240161236d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931783525181519192909182919080838360005b8381101561154357818101518382015260200161152b565b50505050905090810190601f1680156115705780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af1925050508015156115bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd90612408565b3d156115dc575060003d602014156115dc5760206000803e506000515b801515611615576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd90612408565b50505050565b60008060018314611658576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd90612478565b61166984601063ffffffff61194716565b915061167c84602463ffffffff6119a816565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8316906323b872dd906116d590309033908690600401612345565b600060405180830381600087803b1580156116ef57600080fd5b505af1158015610f1f573d6000803e3d6000fd5b6000808315156117165760009150611088565b5082820282848281151561172657fe5b0414611084576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd906123e8565b600080828481151561176c57fe5b04949350505050565b604080517fb4be83d5000000000000000000000000000000000000000000000000000000006020808301919091526060602483018181528751608485019081528884015160a48601529488015160c48501529087015160e4840152608087015161010484015260a087015161012484015260c087015161014484015260e08701516101648401526101008701516101848401526101208701516101a4840152610140870180516101c485019081526101608901516101e4860152610180905251805161020485018190529394919384936044870192849261022489019291820191601f82010460005b8181101561187c57835185526020948501949093019260010161185e565b50505050818103610160808401919091528a0151805180835260209283019291820191601f82010460005b818110156118c55783518552602094850194909301926001016118a7565b50505089845250848103602093840190815288518083529093918201918981019190601f82010460005b8181101561190d5783518552602094850194909301926001016118ef565b5050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08883030188525060405250505050509392505050565b600081601401835110151515611989576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd90612458565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b60006107ba83836000816020018351101515156119f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100bd906123c8565b50016020015190565b608060405190810160405280600081526020016000815260200160008152602001600081525090565b60006107ba8235612540565b6000601f82018313611a4057600080fd5b8135611a53611a4e826124d9565b6124b2565b81815260209384019390925082018360005b83811015611a915781358601611a7b8882611b41565b8452506020928301929190910190600101611a65565b5050505092915050565b6000601f82018313611aac57600080fd5b8135611aba611a4e826124d9565b81815260209384019390925082018360005b83811015611a915781358601611ae28882611b90565b8452506020928301929190910190600101611acc565b600080601f83018413611b0a57600080fd5b50813567ffffffffffffffff811115611b2257600080fd5b602083019150836001820283011115611b3a57600080fd5b9250929050565b6000601f82018313611b5257600080fd5b8135611b60611a4e826124fa565b91508082526020830160208301858383011115611b7c57600080fd5b611b8783828461255c565b50505092915050565b60006101808284031215611ba357600080fd5b611bae6101806124b2565b90506000611bbc8484611a23565b8252506020611bcd84848301611a23565b6020830152506040611be184828501611a23565b6040830152506060611bf584828501611a23565b6060830152506080611c0984828501611cd9565b60808301525060a0611c1d84828501611cd9565b60a08301525060c0611c3184828501611cd9565b60c08301525060e0611c4584828501611cd9565b60e083015250610100611c5a84828501611cd9565b61010083015250610120611c7084828501611cd9565b6101208301525061014082013567ffffffffffffffff811115611c9257600080fd5b611c9e84828501611b41565b6101408301525061016082013567ffffffffffffffff811115611cc057600080fd5b611ccc84828501611b41565b6101608301525092915050565b60006107ba8235612559565b600060208284031215611cf757600080fd5b6000611d038484611a23565b949350505050565b60008060008060008060c08789031215611d2457600080fd5b863567ffffffffffffffff811115611d3b57600080fd5b611d4789828a01611a9b565b965050602087013567ffffffffffffffff811115611d6457600080fd5b611d7089828a01611a2f565b955050604087013567ffffffffffffffff811115611d8d57600080fd5b611d9989828a01611a9b565b945050606087013567ffffffffffffffff811115611db657600080fd5b611dc289828a01611a2f565b9350506080611dd389828a01611cd9565b92505060a0611de489828a01611a23565b9150509295509295509295565b600080600080600080600060e0888a031215611e0c57600080fd5b873567ffffffffffffffff811115611e2357600080fd5b611e2f8a828b01611a9b565b9750506020611e408a828b01611cd9565b965050604088013567ffffffffffffffff811115611e5d57600080fd5b611e698a828b01611a2f565b955050606088013567ffffffffffffffff811115611e8657600080fd5b611e928a828b01611a9b565b945050608088013567ffffffffffffffff811115611eaf57600080fd5b611ebb8a828b01611a2f565b93505060a0611ecc8a828b01611cd9565b92505060c0611edd8a828b01611a23565b91505092959891949750929550565b600080600060408486031215611f0157600080fd5b833567ffffffffffffffff811115611f1857600080fd5b611f2486828701611af8565b93509350506020611f3786828701611cd9565b9150509250925092565b611f4a81612540565b82525050565b602381527f44454641554c545f46554e4354494f4e5f574554485f434f4e54524143545f4f60208201527f4e4c590000000000000000000000000000000000000000000000000000000000604082015260600190565b601181527f494e56414c49445f4d53475f56414c5545000000000000000000000000000000602082015260400190565b600d81527f4f564552534f4c445f5745544800000000000000000000000000000000000000602082015260400190565b601181527f55494e543235365f554e444552464c4f57000000000000000000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601081527f4449564953494f4e5f42595f5a45524f00000000000000000000000000000000602082015260400190565b601081527f55494e543235365f4f564552464c4f5700000000000000000000000000000000602082015260400190565b601781527f554e535550504f525445445f41535345545f50524f5859000000000000000000602082015260400190565b600f81527f5452414e534645525f4641494c45440000000000000000000000000000000000602082015260400190565b601481527f434f4d504c4554455f46494c4c5f4641494c4544000000000000000000000000602082015260400190565b601a81527f494e53554646494349454e545f4554485f52454d41494e494e47000000000000602082015260400190565b601381527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000602082015260400190565b601881527f4645455f50455243454e544147455f544f4f5f4c415247450000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f32305f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b602581527f475245415445525f4f525f455155414c5f544f5f345f4c454e4754485f52455160208201527f5549524544000000000000000000000000000000000000000000000000000000604082015260600190565b600e81527f494e56414c49445f414d4f554e54000000000000000000000000000000000000602082015260400190565b805160808301906122f9848261232e565b50602082015161230c602085018261232e565b50604082015161231f604085018261232e565b50606082015161161560608501825b611f4a81612559565b602081016107bd8284611f41565b606081016123538286611f41565b6123606020830185611f41565b611d03604083018461232e565b6040810161237b8285611f41565b6110e0602083018461232e565b602080825281016107bd81611f50565b602080825281016107bd81611fa6565b602080825281016107bd81611fd6565b602080825281016107bd81612006565b602080825281016107bd81612036565b602080825281016107bd8161208c565b602080825281016107bd816120bc565b602080825281016107bd816120ec565b602080825281016107bd8161211c565b602080825281016107bd8161214c565b602080825281016107bd8161217c565b602080825281016107bd816121ac565b602080825281016107bd816121dc565b602080825281016107bd8161220c565b602080825281016107bd81612262565b602080825281016107bd816122b8565b610100810161249782856122e8565b6110e060808301846122e8565b602081016107bd828461232e565b60405181810167ffffffffffffffff811182821017156124d157600080fd5b604052919050565b600067ffffffffffffffff8211156124f057600080fd5b5060209081020190565b600067ffffffffffffffff82111561251157600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b73ffffffffffffffffffffffffffffffffffffffff1690565b90565b828183375060009101525600a265627a7a72305820d9f418f11e0f91f06f6f9d22924be0add925495eeb76a6388b5417adb505eeb36c6578706572696d656e74616cf50037" - } - } - }, - "networks": {} -} \ No newline at end of file diff --git a/packages/contract-artifacts/artifacts/IValidator.json b/packages/contract-artifacts/artifacts/IValidator.json deleted file mode 100644 index 8ca99f261..000000000 --- a/packages/contract-artifacts/artifacts/IValidator.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "IValidator", - "compilerOutput": { - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "hash", - "type": "bytes32" - }, - { - "name": "signerAddress", - "type": "address" - }, - { - "name": "signature", - "type": "bytes" - } - ], - "name": "isValidSignature", - "outputs": [ - { - "name": "isValid", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "evm": { - "bytecode": { - "object": "0x" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/artifacts/IWallet.json b/packages/contract-artifacts/artifacts/IWallet.json deleted file mode 100644 index 2a8f975cc..000000000 --- a/packages/contract-artifacts/artifacts/IWallet.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "IWallet", - "compilerOutput": { - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "hash", - "type": "bytes32" - }, - { - "name": "signature", - "type": "bytes" - } - ], - "name": "isValidSignature", - "outputs": [ - { - "name": "isValid", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "evm": { - "bytecode": { - "object": "0x" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/artifacts/MultiAssetProxy.json b/packages/contract-artifacts/artifacts/MultiAssetProxy.json deleted file mode 100644 index f143cd817..000000000 --- a/packages/contract-artifacts/artifacts/MultiAssetProxy.json +++ /dev/null @@ -1,263 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "MultiAssetProxy", - "compilerOutput": { - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes4" - } - ], - "name": "assetProxies", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "target", - "type": "address" - } - ], - "name": "addAuthorizedAddress", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "authorities", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "assetProxyId", - "type": "bytes4" - } - ], - "name": "getAssetProxy", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "target", - "type": "address" - } - ], - "name": "removeAuthorizedAddress", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "target", - "type": "address" - }, - { - "name": "index", - "type": "uint256" - } - ], - "name": "removeAuthorizedAddressAtIndex", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getProxyId", - "outputs": [ - { - "name": "", - "type": "bytes4" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "authorized", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "assetProxy", - "type": "address" - } - ], - "name": "registerAssetProxy", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getAuthorizedAddresses", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "payable": false, - "stateMutability": "nonpayable", - "type": "fallback" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "target", - "type": "address" - }, - { - "indexed": true, - "name": "caller", - "type": "address" - } - ], - "name": "AuthorizedAddressAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "target", - "type": "address" - }, - { - "indexed": true, - "name": "caller", - "type": "address" - } - ], - "name": "AuthorizedAddressRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "id", - "type": "bytes4" - }, - { - "indexed": false, - "name": "assetProxy", - "type": "address" - } - ], - "name": "AssetProxyRegistered", - "type": "event" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "0x608060405260008054600160a060020a03191633179055611527806100256000396000f3006080604052600436106100b95763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fd3c997811461048457806342f1181e146104e7578063494503d414610517578063607041081461052f57806370712939146105695780638da5cb5b146105975780639ad26744146105ac578063ae25532e146105dd578063b918161114610627578063c585bb9314610669578063d39de6e914610697578063f2fde38b146106fc575b3480156100c557600080fd5b507fffffffff00000000000000000000000000000000000000000000000000000000600035167fa85e59e40000000000000000000000000000000000000000000000000000000081141561047f573360005260026020526040600020541515610199577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c1553454e4445525f4e4f545f415554484f52495a454400000000000000604052600060605260646000fd5b600435602881013560488201356048820183016020810335604883018501602081033580830315610235577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f4c454e4754485f4d49534d4154434800000000000000000000000000604052600060605260646000fd5b60646000803760806004526064356020840260008060005b8381101561047c5780890135858102818782041487151715156102db577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c1055494e543235365f4f564552464c4f57000000000000000000000000604052600060605260646000fd5b8060645282890135606881018d018f01602081038035600481101561038a577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c1e4c454e4754485f475245415445525f5448414e5f335f5245515549526040527f454400000000000000000000000000000000000000000000000000000000000060605260646000fd5b7fffffffff00000000000000000000000000000000000000000000000000000000833516898103156103cb5780995089608452600160a45260406084205498505b881515610443577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c1a41535345545f50524f58595f444f45535f4e4f545f45584953540000604052600060605260646000fd5b60208201836084376000808360a4016000808d5af1801515610469573d6000803e3d6000fd5b505050505050505060208101905061024d565b50005b600080fd5b34801561049057600080fd5b506104be7fffffffff000000000000000000000000000000000000000000000000000000006004351661072a565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156104f357600080fd5b5061051573ffffffffffffffffffffffffffffffffffffffff60043516610752565b005b34801561052357600080fd5b506104be60043561093e565b34801561053b57600080fd5b506104be7fffffffff0000000000000000000000000000000000000000000000000000000060043516610973565b34801561057557600080fd5b5061051573ffffffffffffffffffffffffffffffffffffffff600435166109bd565b3480156105a357600080fd5b506104be610cb6565b3480156105b857600080fd5b5061051573ffffffffffffffffffffffffffffffffffffffff60043516602435610cd2565b3480156105e957600080fd5b506105f2611087565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b34801561063357600080fd5b5061065573ffffffffffffffffffffffffffffffffffffffff600435166110bd565b604080519115158252519081900360200190f35b34801561067557600080fd5b5061051573ffffffffffffffffffffffffffffffffffffffff600435166110d2565b3480156106a357600080fd5b506106ac61135f565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156106e85781810151838201526020016106d0565b505050509050019250505060405180910390f35b34801561070857600080fd5b5061051573ffffffffffffffffffffffffffffffffffffffff600435166113ce565b60016020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146107d857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604090205460ff161561086d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5441524745545f414c52454144595f415554484f52495a454400000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055513392917f3147867c59d17e8fa9d522465651d44aae0a9e38f902f3475b97e58072f0ed4c91a350565b600380548290811061094c57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b7fffffffff000000000000000000000000000000000000000000000000000000001660009081526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000805473ffffffffffffffffffffffffffffffffffffffff163314610a4457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090205460ff161515610ada57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5441524745545f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b5073ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b600354811015610c6f578173ffffffffffffffffffffffffffffffffffffffff16600382815481101515610b5757fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161415610c6757600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110610baf57fe5b6000918252602090912001546003805473ffffffffffffffffffffffffffffffffffffffff9092169183908110610be257fe5b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190610c6190826114b4565b50610c6f565b600101610b27565b604051339073ffffffffffffffffffffffffffffffffffffffff8416907f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b090600090a35050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d5857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090205460ff161515610dee57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5441524745545f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b6003548110610e5e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e4445585f4f55545f4f465f424f554e445300000000000000000000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff16600382815481101515610e8457fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614610f1257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f415554484f52495a45445f414444524553535f4d49534d415443480000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110610f8d57fe5b6000918252602090912001546003805473ffffffffffffffffffffffffffffffffffffffff9092169183908110610fc057fe5b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019061103f90826114b4565b50604051339073ffffffffffffffffffffffffffffffffffffffff8416907f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b090600090a35050565b604080517f4d756c746941737365742875696e743235365b5d2c62797465735b5d290000008152905190819003601d0190205b90565b60026020526000908152604090205460ff1681565b600080548190819073ffffffffffffffffffffffffffffffffffffffff16331461115d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b8392508273ffffffffffffffffffffffffffffffffffffffff1663ae25532e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156111c457600080fd5b505af11580156111d8573d6000803e3d6000fd5b505050506040513d60208110156111ee57600080fd5b50517fffffffff00000000000000000000000000000000000000000000000000000000811660009081526001602052604090205490925073ffffffffffffffffffffffffffffffffffffffff16905080156112aa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f41535345545f50524f58595f414c52454144595f455849535453000000000000604482015290519081900360640190fd5b7fffffffff00000000000000000000000000000000000000000000000000000000821660008181526001602090815260409182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff88811691909117909155825193845287169083015280517fd2c6b762299c609bdb96520b58a49bfb80186934d4f71a86a367571a15c031949281900390910190a150505050565b606060038054806020026020016040519081016040528092919081815260200182805480156113c457602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611399575b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff16331461145457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116156114b157600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b8154818355818111156114d8576000838152602090206114d89181019083016114dd565b505050565b6110ba91905b808211156114f757600081556001016114e3565b50905600a165627a7a72305820edc27b59aaf514c0deebc8a00d0f17f092fc6e8b8544bcccb6f7e8f4a81c781d0029" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/artifacts/OrderValidator.json b/packages/contract-artifacts/artifacts/OrderValidator.json deleted file mode 100644 index 90a92e7cb..000000000 --- a/packages/contract-artifacts/artifacts/OrderValidator.json +++ /dev/null @@ -1,572 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "OrderValidator", - "compilerOutput": { - "abi": [ - { - "constant": true, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "order", - "type": "tuple" - }, - { - "name": "takerAddress", - "type": "address" - } - ], - "name": "getOrderAndTraderInfo", - "outputs": [ - { - "components": [ - { - "name": "orderStatus", - "type": "uint8" - }, - { - "name": "orderHash", - "type": "bytes32" - }, - { - "name": "orderTakerAssetFilledAmount", - "type": "uint256" - } - ], - "name": "orderInfo", - "type": "tuple" - }, - { - "components": [ - { - "name": "makerBalance", - "type": "uint256" - }, - { - "name": "makerAllowance", - "type": "uint256" - }, - { - "name": "takerBalance", - "type": "uint256" - }, - { - "name": "takerAllowance", - "type": "uint256" - }, - { - "name": "makerZrxBalance", - "type": "uint256" - }, - { - "name": "makerZrxAllowance", - "type": "uint256" - }, - { - "name": "takerZrxBalance", - "type": "uint256" - }, - { - "name": "takerZrxAllowance", - "type": "uint256" - } - ], - "name": "traderInfo", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "target", - "type": "address" - }, - { - "name": "assetData", - "type": "bytes" - } - ], - "name": "getBalanceAndAllowance", - "outputs": [ - { - "name": "balance", - "type": "uint256" - }, - { - "name": "allowance", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "orders", - "type": "tuple[]" - }, - { - "name": "takerAddresses", - "type": "address[]" - } - ], - "name": "getOrdersAndTradersInfo", - "outputs": [ - { - "components": [ - { - "name": "orderStatus", - "type": "uint8" - }, - { - "name": "orderHash", - "type": "bytes32" - }, - { - "name": "orderTakerAssetFilledAmount", - "type": "uint256" - } - ], - "name": "ordersInfo", - "type": "tuple[]" - }, - { - "components": [ - { - "name": "makerBalance", - "type": "uint256" - }, - { - "name": "makerAllowance", - "type": "uint256" - }, - { - "name": "takerBalance", - "type": "uint256" - }, - { - "name": "takerAllowance", - "type": "uint256" - }, - { - "name": "makerZrxBalance", - "type": "uint256" - }, - { - "name": "makerZrxAllowance", - "type": "uint256" - }, - { - "name": "takerZrxBalance", - "type": "uint256" - }, - { - "name": "takerZrxAllowance", - "type": "uint256" - } - ], - "name": "tradersInfo", - "type": "tuple[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "orders", - "type": "tuple[]" - }, - { - "name": "takerAddresses", - "type": "address[]" - } - ], - "name": "getTradersInfo", - "outputs": [ - { - "components": [ - { - "name": "makerBalance", - "type": "uint256" - }, - { - "name": "makerAllowance", - "type": "uint256" - }, - { - "name": "takerBalance", - "type": "uint256" - }, - { - "name": "takerAllowance", - "type": "uint256" - }, - { - "name": "makerZrxBalance", - "type": "uint256" - }, - { - "name": "makerZrxAllowance", - "type": "uint256" - }, - { - "name": "takerZrxBalance", - "type": "uint256" - }, - { - "name": "takerZrxAllowance", - "type": "uint256" - } - ], - "name": "", - "type": "tuple[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "token", - "type": "address" - }, - { - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getERC721TokenOwner", - "outputs": [ - { - "name": "owner", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "target", - "type": "address" - }, - { - "name": "assetData", - "type": "bytes[]" - } - ], - "name": "getBalancesAndAllowances", - "outputs": [ - { - "name": "", - "type": "uint256[]" - }, - { - "name": "", - "type": "uint256[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "components": [ - { - "name": "makerAddress", - "type": "address" - }, - { - "name": "takerAddress", - "type": "address" - }, - { - "name": "feeRecipientAddress", - "type": "address" - }, - { - "name": "senderAddress", - "type": "address" - }, - { - "name": "makerAssetAmount", - "type": "uint256" - }, - { - "name": "takerAssetAmount", - "type": "uint256" - }, - { - "name": "makerFee", - "type": "uint256" - }, - { - "name": "takerFee", - "type": "uint256" - }, - { - "name": "expirationTimeSeconds", - "type": "uint256" - }, - { - "name": "salt", - "type": "uint256" - }, - { - "name": "makerAssetData", - "type": "bytes" - }, - { - "name": "takerAssetData", - "type": "bytes" - } - ], - "name": "order", - "type": "tuple" - }, - { - "name": "takerAddress", - "type": "address" - } - ], - "name": "getTraderInfo", - "outputs": [ - { - "components": [ - { - "name": "makerBalance", - "type": "uint256" - }, - { - "name": "makerAllowance", - "type": "uint256" - }, - { - "name": "takerBalance", - "type": "uint256" - }, - { - "name": "takerAllowance", - "type": "uint256" - }, - { - "name": "makerZrxBalance", - "type": "uint256" - }, - { - "name": "makerZrxAllowance", - "type": "uint256" - }, - { - "name": "takerZrxBalance", - "type": "uint256" - }, - { - "name": "takerZrxAllowance", - "type": "uint256" - } - ], - "name": "traderInfo", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "name": "_exchange", - "type": "address" - }, - { - "name": "_zrxAssetData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": - "0x60806040523480156200001157600080fd5b5060405162001d3a38038062001d3a833981018060405262000037919081019062000186565b60008054600160a060020a031916600160a060020a03841617905580516200006790600190602084019062000070565b5050506200026b565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620000b357805160ff1916838001178555620000e3565b82800160010185558215620000e3579182015b82811115620000e3578251825591602001919060010190620000c6565b50620000f1929150620000f5565b5090565b6200011291905b80821115620000f15760008155600101620000fc565b90565b60006200012382516200022c565b9392505050565b6000601f820183136200013c57600080fd5b8151620001536200014d8262000204565b620001dd565b915080825260208301602083018583830111156200017057600080fd5b6200017d83828462000238565b50505092915050565b600080604083850312156200019a57600080fd5b6000620001a8858562000115565b92505060208301516001604060020a03811115620001c557600080fd5b620001d3858286016200012a565b9150509250929050565b6040518181016001604060020a0381118282101715620001fc57600080fd5b604052919050565b60006001604060020a038211156200021b57600080fd5b506020601f91909101601f19160190565b600160a060020a031690565b60005b83811015620002555781810151838201526020016200023b565b8381111562000265576000848401525b50505050565b611abf806200027b6000396000f3006080604052600436106100825763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304ad1e5381146100875780632cd0fc73146100be5780634b95de13146100ec578063690d31141461011a578063b698846314610147578063c6b7f4ee14610174578063f241ffb0146101a2575b600080fd5b34801561009357600080fd5b506100a76100a23660046112d3565b6101cf565b6040516100b59291906118dc565b60405180910390f35b3480156100ca57600080fd5b506100de6100d936600461118b565b61029c565b6040516100b5929190611926565b3480156100f857600080fd5b5061010c610107366004611238565b6107cd565b6040516100b5929190611822565b34801561012657600080fd5b5061013a610135366004611238565b6108a4565b6040516100b59190611858565b34801561015357600080fd5b506101676101623660046111d3565b61095e565b6040516100b591906117f9565b34801561018057600080fd5b5061019461018f366004611139565b6109a9565b6040516100b5929190611869565b3480156101ae57600080fd5b506101c26101bd3660046112d3565b610a86565b6040516100b59190611909565b6101d7610cd0565b6101df610cf0565b6000546040517fc75e0a8100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063c75e0a81906102359087906004016118f8565b606060405180830381600087803b15801561024f57600080fd5b505af1158015610263573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061028791908101906112b5565b91506102938484610a86565b90509250929050565b6000808080808080806102b5898263ffffffff610ba416565b95506102c889601063ffffffff610c1116565b6000546040517f6070410800000000000000000000000000000000000000000000000000000000815291965073ffffffffffffffffffffffffffffffffffffffff169063607041089061031f90899060040161188e565b602060405180830381600087803b15801561033957600080fd5b505af115801561034d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506103719190810190611113565b604080517f4552433230546f6b656e28616464726573732900000000000000000000000000815290519081900360130190209094507fffffffff0000000000000000000000000000000000000000000000000000000087811691161415610526576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8616906370a0823190610424908d906004016117f9565b602060405180830381600087803b15801561043e57600080fd5b505af1158015610452573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610476919081019061131a565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815290985073ffffffffffffffffffffffffffffffffffffffff86169063dd62ed3e906104cd908d908890600401611807565b602060405180830381600087803b1580156104e757600080fd5b505af11580156104fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061051f919081019061131a565b96506107c0565b604080517f455243373231546f6b656e28616464726573732c75696e7432353629000000008152905190819003601c0190207fffffffff00000000000000000000000000000000000000000000000000000000878116911614156107855761059589602463ffffffff610c7216565b92506105a1858461095e565b91508173ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff16146105dd5760006105e0565b60015b60ff1697508473ffffffffffffffffffffffffffffffffffffffff1663e985e9c58b866040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161063c929190611807565b602060405180830381600087803b15801561065657600080fd5b505af115801561066a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061068e9190810190611297565b8061076a57508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1663081812fc856040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016107009190611918565b602060405180830381600087803b15801561071a57600080fd5b505af115801561072e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506107529190810190611113565b73ffffffffffffffffffffffffffffffffffffffff16145b90508061077857600061077b565b60015b60ff1696506107c0565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b7906118ac565b60405180910390fd5b5050505050509250929050565b6000546040517f7e9d74dc000000000000000000000000000000000000000000000000000000008152606091829173ffffffffffffffffffffffffffffffffffffffff90911690637e9d74dc90610828908790600401611847565b600060405180830381600087803b15801561084257600080fd5b505af1158015610856573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261089c9190810190611203565b915061029384845b606060006060600085519250826040519080825280602002602001820160405280156108ea57816020015b6108d7610cf0565b8152602001906001900390816108cf5790505b509150600090505b80831461095157610931868281518110151561090a57fe5b90602001906020020151868381518110151561092257fe5b90602001906020020151610a86565b828281518110151561093f57fe5b602090810290910101526001016108f2565b8193505b50505092915050565b60006040517f6352211e000000000000000000000000000000000000000000000000000000008152826004820152602081602483875afa80156109a057815192505b50505b92915050565b6060806000606080600086519350836040519080825280602002602001820160405280156109e1578160200160208202803883390190505b50925083604051908082528060200260200182016040528015610a0e578160200160208202803883390190505b509150600090505b808414610a7957610a3e888883815181101515610a2f57fe5b9060200190602002015161029c565b8483815181101515610a4c57fe5b9060200190602002018484815181101515610a6357fe5b6020908102909101019190915252600101610a16565b5090969095509350505050565b610a8e610cf0565b6060610aa3846000015185610140015161029c565b60208401528252610160840151610abb90849061029c565b60608401526040808401919091526001805482516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101008688161502019094169390930492830181900481028201810190945281815292830182828015610b6a5780601f10610b3f57610100808354040283529160200191610b6a565b820191906000526020600020905b815481529060010190602001808311610b4d57829003601f168201915b50505050509050610b7f84600001518261029c565b60a08401526080830152610b93838261029c565b60e084015260c08301525092915050565b600081600401835110151515610be6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b7906118cc565b5001602001517fffffffff000000000000000000000000000000000000000000000000000000001690565b600081601401835110151515610c53576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b7906118bc565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b6000610c7e8383610c85565b9392505050565b600081602001835110151515610cc7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b79061189c565b50016020015190565b604080516060810182526000808252602082018190529181019190915290565b6101006040519081016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6000610c7e82356119d9565b6000610c7e82516119d9565b6000601f82018313610d5f57600080fd5b8135610d72610d6d82611968565b611941565b91508181835260208401935060208101905083856020840282011115610d9757600080fd5b60005b83811015610dc35781610dad8882610d36565b8452506020928301929190910190600101610d9a565b5050505092915050565b6000601f82018313610dde57600080fd5b8135610dec610d6d82611968565b81815260209384019390925082018360005b83811015610dc35781358601610e148882610f11565b8452506020928301929190910190600101610dfe565b6000601f82018313610e3b57600080fd5b8151610e49610d6d82611968565b91508181835260208401935060208101905083856060840282011115610e6e57600080fd5b60005b83811015610dc35781610e848882610f57565b84525060209092019160609190910190600101610e71565b6000601f82018313610ead57600080fd5b8135610ebb610d6d82611968565b81815260209384019390925082018360005b83811015610dc35781358601610ee38882610fb2565b8452506020928301929190910190600101610ecd565b6000610c7e8251611a20565b6000610c7e82516119f2565b6000601f82018313610f2257600080fd5b8135610f30610d6d82611989565b91508082526020830160208301858383011115610f4c57600080fd5b610955838284611a25565b600060608284031215610f6957600080fd5b610f736060611941565b90506000610f818484611107565b8252506020610f9284848301610f05565b6020830152506040610fa684828501610f05565b60408301525092915050565b60006101808284031215610fc557600080fd5b610fd0610180611941565b90506000610fde8484610d36565b8252506020610fef84848301610d36565b602083015250604061100384828501610d36565b604083015250606061101784828501610d36565b606083015250608061102b848285016110fb565b60808301525060a061103f848285016110fb565b60a08301525060c0611053848285016110fb565b60c08301525060e0611067848285016110fb565b60e08301525061010061107c848285016110fb565b61010083015250610120611092848285016110fb565b6101208301525061014082013567ffffffffffffffff8111156110b457600080fd5b6110c084828501610f11565b6101408301525061016082013567ffffffffffffffff8111156110e257600080fd5b6110ee84828501610f11565b6101608301525092915050565b6000610c7e82356119f2565b6000610c7e8251611a1a565b60006020828403121561112557600080fd5b60006111318484610d42565b949350505050565b6000806040838503121561114c57600080fd5b60006111588585610d36565b925050602083013567ffffffffffffffff81111561117557600080fd5b61118185828601610dcd565b9150509250929050565b6000806040838503121561119e57600080fd5b60006111aa8585610d36565b925050602083013567ffffffffffffffff8111156111c757600080fd5b61118185828601610f11565b600080604083850312156111e657600080fd5b60006111f28585610d36565b9250506020611181858286016110fb565b60006020828403121561121557600080fd5b815167ffffffffffffffff81111561122c57600080fd5b61113184828501610e2a565b6000806040838503121561124b57600080fd5b823567ffffffffffffffff81111561126257600080fd5b61126e85828601610e9c565b925050602083013567ffffffffffffffff81111561128b57600080fd5b61118185828601610d4e565b6000602082840312156112a957600080fd5b60006111318484610ef9565b6000606082840312156112c757600080fd5b60006111318484610f57565b600080604083850312156112e657600080fd5b823567ffffffffffffffff8111156112fd57600080fd5b61130985828601610fb2565b925050602061118185828601610d36565b60006020828403121561132c57600080fd5b60006111318484610f05565b611341816119d9565b82525050565b6000611352826119d5565b808452602084019350611364836119cf565b60005b828110156113945761137a868351611619565b611383826119cf565b606096909601959150600101611367565b5093949350505050565b60006113a9826119d5565b808452602084019350836020820285016113c2856119cf565b60005b848110156113f95783830388526113dd838351611656565b92506113e8826119cf565b6020989098019791506001016113c5565b50909695505050505050565b6000611410826119d5565b808452602084019350611422836119cf565b60005b8281101561139457611438868351611759565b611441826119cf565b61010096909601959150600101611425565b600061145e826119d5565b808452602084019350611470836119cf565b60005b82811015611394576114868683516114a0565b61148f826119cf565b602096909601959150600101611473565b611341816119f2565b611341816119f5565b60006114bd826119d5565b8084526114d1816020860160208601611a31565b6114da81611a5d565b9093016020019392505050565b602681527f475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601781527f554e535550504f525445445f41535345545f50524f5859000000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f32305f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b602581527f475245415445525f4f525f455155414c5f544f5f345f4c454e4754485f52455160208201527f5549524544000000000000000000000000000000000000000000000000000000604082015260600190565b8051606083019061162a84826117f0565b50602082015161163d60208501826114a0565b50604082015161165060408501826114a0565b50505050565b805160009061018084019061166b8582611338565b50602083015161167e6020860182611338565b5060408301516116916040860182611338565b5060608301516116a46060860182611338565b5060808301516116b760808601826114a0565b5060a08301516116ca60a08601826114a0565b5060c08301516116dd60c08601826114a0565b5060e08301516116f060e08601826114a0565b506101008301516117056101008601826114a0565b5061012083015161171a6101208601826114a0565b5061014083015184820361014086015261173482826114b2565b91505061016083015184820361016086015261175082826114b2565b95945050505050565b805161010083019061176b84826114a0565b50602082015161177e60208501826114a0565b50604082015161179160408501826114a0565b5060608201516117a460608501826114a0565b5060808201516117b760808501826114a0565b5060a08201516117ca60a08501826114a0565b5060c08201516117dd60c08501826114a0565b5060e082015161165060e08501826114a0565b61134181611a1a565b602081016109a38284611338565b604081016118158285611338565b610c7e6020830184611338565b604080825281016118338185611347565b905081810360208301526111318184611405565b60208082528101610c7e818461139e565b60208082528101610c7e8184611405565b6040808252810161187a8185611453565b905081810360208301526111318184611453565b602081016109a382846114a9565b602080825281016109a3816114e7565b602080825281016109a38161153d565b602080825281016109a38161156d565b602080825281016109a3816115c3565b61016081016118eb8285611619565b610c7e6060830184611759565b60208082528101610c7e8184611656565b61010081016109a38284611759565b602081016109a382846114a0565b6040810161193482856114a0565b610c7e60208301846114a0565b60405181810167ffffffffffffffff8111828210171561196057600080fd5b604052919050565b600067ffffffffffffffff82111561197f57600080fd5b5060209081020190565b600067ffffffffffffffff8211156119a057600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60200190565b5190565b73ffffffffffffffffffffffffffffffffffffffff1690565b90565b7fffffffff000000000000000000000000000000000000000000000000000000001690565b60ff1690565b151590565b82818337506000910152565b60005b83811015611a4c578181015183820152602001611a34565b838111156116505750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905600a265627a7a72305820d2e97e29f930427e8936d11af9a8ee1660886400d9687abb10c976177f33449c6c6578706572696d656e74616cf50037" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/artifacts/WETH9.json b/packages/contract-artifacts/artifacts/WETH9.json deleted file mode 100644 index e6ce25f7d..000000000 --- a/packages/contract-artifacts/artifacts/WETH9.json +++ /dev/null @@ -1,293 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "WETH9", - "compilerOutput": { - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "guy", - "type": "address" - }, - { - "name": "wad", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "src", - "type": "address" - }, - { - "name": "dst", - "type": "address" - }, - { - "name": "wad", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "wad", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "dst", - "type": "address" - }, - { - "name": "wad", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "deposit", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - }, - { - "name": "", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "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": "_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": 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" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": - "0x60c0604052600d60808190527f577261707065642045746865720000000000000000000000000000000000000060a090815261003e91600091906100a3565b506040805180820190915260048082527f57455448000000000000000000000000000000000000000000000000000000006020909201918252610083916001916100a3565b506002805460ff1916601217905534801561009d57600080fd5b5061013e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100e457805160ff1916838001178555610111565b82800160010185558215610111579182015b828111156101115782518255916020019190600101906100f6565b5061011d929150610121565b5090565b61013b91905b8082111561011d5760008155600101610127565b90565b6107688061014d6000396000f3006080604052600436106100ae5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100b8578063095ea7b31461014257806318160ddd1461018757806323b872dd146101ae5780632e1a7d4d146101e5578063313ce567146101fd57806370a082311461022857806395d89b4114610256578063a9059cbb1461026b578063d0e30db0146100ae578063dd62ed3e1461029c575b6100b66102d0565b005b3480156100c457600080fd5b506100cd61031f565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101075781810151838201526020016100ef565b50505050905090810190601f1680156101345780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014e57600080fd5b5061017373ffffffffffffffffffffffffffffffffffffffff600435166024356103cb565b604080519115158252519081900360200190f35b34801561019357600080fd5b5061019c61043e565b60408051918252519081900360200190f35b3480156101ba57600080fd5b5061017373ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610443565b3480156101f157600080fd5b506100b66004356105e3565b34801561020957600080fd5b50610212610678565b6040805160ff9092168252519081900360200190f35b34801561023457600080fd5b5061019c73ffffffffffffffffffffffffffffffffffffffff60043516610681565b34801561026257600080fd5b506100cd610693565b34801561027757600080fd5b5061017373ffffffffffffffffffffffffffffffffffffffff6004351660243561070b565b3480156102a857600080fd5b5061019c73ffffffffffffffffffffffffffffffffffffffff6004358116906024351661071f565b33600081815260036020908152604091829020805434908101909155825190815291517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9281900390910190a2565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156103c35780601f10610398576101008083540402835291602001916103c3565b820191906000526020600020905b8154815290600101906020018083116103a657829003601f168201915b505050505081565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b303190565b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081205482111561047557600080fd5b73ffffffffffffffffffffffffffffffffffffffff841633148015906104eb575073ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14155b156105655773ffffffffffffffffffffffffffffffffffffffff8416600090815260046020908152604080832033845290915290205482111561052d57600080fd5b73ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020805483900390555b73ffffffffffffffffffffffffffffffffffffffff808516600081815260036020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b336000908152600360205260409020548111156105ff57600080fd5b33600081815260036020526040808220805485900390555183156108fc0291849190818181858888f1935050505015801561063e573d6000803e3d6000fd5b5060408051828152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a250565b60025460ff1681565b60036020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156103c35780601f10610398576101008083540402835291602001916103c3565b6000610718338484610443565b9392505050565b6004602090815260009283526040808420909152908252902054815600a165627a7a72305820228981f11f47ad9630080069b0a81423fcfba5aa8e0f478a579c4bc080ba7e820029" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/artifacts/ZRXToken.json b/packages/contract-artifacts/artifacts/ZRXToken.json deleted file mode 100644 index 29bb55824..000000000 --- a/packages/contract-artifacts/artifacts/ZRXToken.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "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" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": - "0x60606040526b033b2e3c9fd0803ce8000000600355341561001c57fe5b5b600354600160a060020a0333166000908152602081905260409020555b5b61078d8061004a6000396000f300606060405236156100965763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610098578063095ea7b31461014657806318160ddd1461018657806323b872dd146101a8578063313ce567146101ee57806370a082311461021457806395d89b411461024f578063a9059cbb146102fd578063dd62ed3e1461033d575bfe5b34156100a057fe5b6100a861037e565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014e57fe5b61017273ffffffffffffffffffffffffffffffffffffffff600435166024356103b5565b604080519115158252519081900360200190f35b341561018e57fe5b61019661042d565b60408051918252519081900360200190f35b34156101b057fe5b61017273ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610433565b604080519115158252519081900360200190f35b34156101f657fe5b6101fe6105d4565b6040805160ff9092168252519081900360200190f35b341561021c57fe5b61019673ffffffffffffffffffffffffffffffffffffffff600435166105d9565b60408051918252519081900360200190f35b341561025757fe5b6100a8610605565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561030557fe5b61017273ffffffffffffffffffffffffffffffffffffffff6004351660243561063c565b604080519115158252519081900360200190f35b341561034557fe5b61019673ffffffffffffffffffffffffffffffffffffffff60043581169060243516610727565b60408051918252519081900360200190f35b60408051808201909152601181527f30782050726f746f636f6c20546f6b656e000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60035481565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906104835750828110155b80156104b6575073ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090205483810110155b156105c65773ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220805487019055918716815220805484900390557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156105585773ffffffffffffffffffffffffffffffffffffffff808616600090815260016020908152604080832033909416835292905220805484900390555b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191506105cb565b600091505b5b509392505050565b601281565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020545b919050565b60408051808201909152600381527f5a52580000000000000000000000000000000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff3316600090815260208190526040812054829010801590610699575073ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110155b156107185773ffffffffffffffffffffffffffffffffffffffff33811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610427565b506000610427565b5b92915050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600160209081526040808320938516835292905220545b929150505600a165627a7a723058201b5b70cf82a73dec658c2e60ab9a0f8e2ba01a74b66a6f5b0402f56d2ea0ffcf0029" - } - } - }, - "networks": {} -} diff --git a/packages/contract-artifacts/package.json b/packages/contract-artifacts/package.json deleted file mode 100644 index 6a98615d7..000000000 --- a/packages/contract-artifacts/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@0x/contract-artifacts", - "version": "1.3.0", - "engines": { - "node": ">=6.12" - }, - "description": "0x smart contract compilation artifacts", - "main": "lib/src/index.js", - "directories": { - "test": "test" - }, - "scripts": { - "build": "yarn tsc -b", - "build:ci": "yarn build", - "clean": "shx rm -rf lib" - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo.git" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x-monorepo/issues" - }, - "homepage": "https://github.com/0xProject/0x-monorepo/packages/contract-artifacts/README.md", - "devDependencies": { - "shx": "^0.2.2", - "typescript": "3.0.1" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/contract-artifacts/src/index.ts b/packages/contract-artifacts/src/index.ts deleted file mode 100644 index 1cbda9518..000000000 --- a/packages/contract-artifacts/src/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -import * as AssetProxyOwner from '../artifacts/AssetProxyOwner.json'; -import * as DummyERC20Token from '../artifacts/DummyERC20Token.json'; -import * as DummyERC721Token from '../artifacts/DummyERC721Token.json'; -import * as DutchAuction from '../artifacts/DutchAuction.json'; -import * as ERC20Proxy from '../artifacts/ERC20Proxy.json'; -import * as ERC20Token from '../artifacts/ERC20Token.json'; -import * as ERC721Proxy from '../artifacts/ERC721Proxy.json'; -import * as ERC721Token from '../artifacts/ERC721Token.json'; -import * as Exchange from '../artifacts/Exchange.json'; -import * as Forwarder from '../artifacts/Forwarder.json'; -import * as IValidator from '../artifacts/IValidator.json'; -import * as IWallet from '../artifacts/IWallet.json'; -import * as MultiAssetProxy from '../artifacts/MultiAssetProxy.json'; -import * as OrderValidator from '../artifacts/OrderValidator.json'; -import * as WETH9 from '../artifacts/WETH9.json'; -import * as ZRXToken from '../artifacts/ZRXToken.json'; - -export { - AssetProxyOwner, - DutchAuction, - DummyERC20Token, - DummyERC721Token, - ERC20Proxy, - ERC20Token, - ERC721Proxy, - ERC721Token, - Exchange, - Forwarder, - IValidator, - IWallet, - MultiAssetProxy, - OrderValidator, - WETH9, - ZRXToken, -}; diff --git a/packages/contract-artifacts/tsconfig.json b/packages/contract-artifacts/tsconfig.json deleted file mode 100644 index 1aef41bb8..000000000 --- a/packages/contract-artifacts/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "lib", - "rootDir": ".", - "resolveJsonModule": true - }, - "include": ["./src/**/*"], - "files": [ - "./artifacts/AssetProxyOwner.json", - "./artifacts/DutchAuction.json", - "./artifacts/DummyERC20Token.json", - "./artifacts/DummyERC721Token.json", - "./artifacts/ERC20Proxy.json", - "./artifacts/ERC20Token.json", - "./artifacts/ERC721Proxy.json", - "./artifacts/ERC721Token.json", - "./artifacts/Exchange.json", - "./artifacts/Forwarder.json", - "./artifacts/IValidator.json", - "./artifacts/IWallet.json", - "./artifacts/MultiAssetProxy.json", - "./artifacts/OrderValidator.json", - "./artifacts/WETH9.json", - "./artifacts/ZRXToken.json" - ] -} diff --git a/packages/contract-artifacts/tslint.json b/packages/contract-artifacts/tslint.json deleted file mode 100644 index dd9053357..000000000 --- a/packages/contract-artifacts/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@0x/tslint-config"] -} diff --git a/packages/contract-wrappers/.npmignore b/packages/contract-wrappers/.npmignore deleted file mode 100644 index 6a222fd45..000000000 --- a/packages/contract-wrappers/.npmignore +++ /dev/null @@ -1,11 +0,0 @@ -.* -tsconfig.json -webpack.config.js -yarn-error.log -test/ -/src/ -/_bundles/ -/abi-gen-templates/ -/generated_docs/ -/scripts/ -/lib/src/monorepo_scripts/ diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json deleted file mode 100644 index 30199ae1d..000000000 --- a/packages/contract-wrappers/CHANGELOG.json +++ /dev/null @@ -1,414 +0,0 @@ -[ - { - "version": "6.0.0", - "changes": [ - { - "note": "Upgrade the bignumber.js to v8.0.2", - "pr": 1517 - } - ] - }, - { - "timestamp": 1547747677, - "version": "5.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "5.0.0", - "changes": [ - { - "note": "Renamed OrderStatus enum members to PascalCase to conform with tslint enum-naming rule", - "pr": 1474 - }, - { - "note": "Remove Exchange `matchOrdersAsync` optimization", - "pr": 1514 - } - ], - "timestamp": 1547561734 - }, - { - "timestamp": 1547225310, - "version": "4.2.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "4.2.0", - "changes": [ - { - "note": "Added Dutch Auction wrapper", - "pr": 1465 - } - ], - "timestamp": 1547040760 - }, - { - "version": "4.1.4", - "changes": [ - { - "note": "Add support for Trust Wallet signature denial error" - }, - { - "note": "Add balance and allowance queries for `MultiAssetProxy`", - "pr": 1363 - } - ] - }, - { - "version": "4.1.3", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544739608 - }, - { - "version": "4.1.2", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1544570656 - }, - { - "timestamp": 1543401373, - "version": "4.1.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "4.1.0", - "changes": [ - { - "note": "Add a `nonce` field for `TxOpts` so that it's now possible to re-broadcast stuck transactions with a higher gas amount", - "pr": 1292 - } - ], - "timestamp": 1542821676 - }, - { - "timestamp": 1542208198, - "version": "4.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1542134075, - "version": "4.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "4.0.0", - "changes": [ - { - "note": "Add signature validation, regular cancellation and `cancelledUpTo` checks to `validateOrderFillableOrThrowAsync`", - "pr": 1235 - }, - { - "note": "Improved the errors thrown by `validateOrderFillableOrThrowAsync` by making them more descriptive", - "pr": 1235 - }, - { - "note": "Throw previously swallowed network errors when calling `validateOrderFillableOrThrowAsync` (see issue: #1218)", - "pr": 1235 - } - ], - "timestamp": 1542028948 - }, - { - "version": "3.0.1", - "changes": [ - { - "note": "Fix bug in `ForwarderWrapper` where `feeRecipientAddress` was not correctly normalized.", - "pr": 1178 - } - ], - "timestamp": 1541740904 - }, - { - "version": "3.0.0", - "changes": [ - { - "note": "Add optional validation to the forwarder wrapper methods" - }, - { - "note": "Updated to use new modularized artifacts.", - "pr": 1105 - }, - { - "note": "Top-level `ContractWrappers` class has a new optional `contractAddresses` parameter.", - "pr": 1105 - }, - { - "note": "Default contract addresses are no longer stored in artifacts and are instead loaded from the `@0xproject/contract-addresses` package.", - "pr": 1105 - }, - { - "note": "Most contract addresses are now defined at instantiation time and are available as properties (e.g., `exchangeWrapper.address`) instead of methods (e.g., `exchangeWrapper.getContractAddress()`).", - "pr": 1105 - }, - { - "note": "Removed `setProvider` method in top-level `ContractWrapper` class and added new `unsubscribeAll` method.", - "pr": 1105 - }, - { - "note": "Some properties and methods have been renamed. For example, some methods that previously could throw no longer can, and so their names have been updated accordingly.", - "pr": 1105 - }, - { - "note": "Removed ContractNotFound errors. Checking for this error was somewhat ineffecient. Relevant methods/functions now return the default error from web3-wrapper, which we feel provides enough information.", - "pr": 1105 - }, - { - "note": "Add `ForwarderWrapperError` to public interface", - "pr": 1147 - }, - { - "note": "Add `ContractWrapperError.SignatureRequestDenied` to public interface", - "pr": 1147 - } - ], - "timestamp": 1539871071 - }, - { - "version": "2.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1538693146 - }, - { - "timestamp": 1538157789, - "version": "2.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "2.0.0", - "changes": [ - { - "note": "Fixes dropped events in subscriptions by fetching logs by blockHash instead of blockNumber. Support for fetching by blockHash was added in Geth > v1.8.13 and Parity > v2.1.0. Infura works too.", - "pr": 1080 - }, - { - "note": "Fix misunderstanding about blockstream interface callbacks and pass the raw JSON RPC responses to it", - "pr": 1080 - } - ], - "timestamp": 1537907159 - }, - { - "version": "1.0.5", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1537875740 - }, - { - "version": "1.0.4", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1537541580 - }, - { - "version": "1.0.3", - "changes": [ - { - "note": "Drastically reduce the bundle size by removing unused parts of included contract artifacts." - } - ], - "timestamp": 1537369748 - }, - { - "version": "1.0.2", - "changes": [ - { - "note": "Add ZRX & WETH mainnet contract addresses into the included artifacts" - } - ], - "timestamp": 1537265493 - }, - { - "version": "1.0.1", - "changes": [ - { - "note": "Add `OrderValidatorWrapper`" - }, - { - "note": "Fix bug where contracts not deployed on a network showed an `EXCHANGE_CONTRACT_DOES_NOT_EXIST` error instead of `CONTRACT_NOT_DEPLOYED_ON_NETWORK`", - "pr": 1044 - }, - { - "note": "Export `AssetBalanceAndProxyAllowanceFetcher` and `OrderFilledCancelledFetcher` implementations", - "pr": 1054 - }, - { - "note": "Add `validateOrderFillableOrThrowAsync` and `validateFillOrderThrowIfInvalidAsync` to ExchangeWrapper", - "pr": 1054 - } - ], - "timestamp": 1536142250 - }, - { - "version": "1.0.1-rc.5", - "changes": [ - { - "note": "Fix missing `BlockParamLiteral` type import issue" - } - ], - "timestamp": 1535377027 - }, - { - "version": "1.0.1-rc.4", - "changes": [ - { - "note": "Export missing types: `TransactionEncoder`, `ContractAbi`, `JSONRPCRequestPayload`, `JSONRPCResponsePayload`, `JSONRPCErrorCallback`, `AbiDefinition`, `FunctionAbi`, `EventAbi`, `EventParameter`, `DecodedLogArgs`, `MethodAbi`, `ConstructorAbi`, `FallbackAbi`, `DataItem`, `ConstructorStateMutability`, `StateMutability` & `ExchangeSignatureValidatorApprovalEventArgs`", - "pr": 924 - }, - { - "note": "Remove superfluous exported types: `ContractEvent`, `Token`, `OrderFillRequest`, `ContractEventArgs`, `LogEvent`, `OnOrderStateChangeCallback`, `ECSignature`, `OrderStateValid`, `OrderStateInvalid`, `OrderState`, `FilterObject`, `TransactionReceipt` & `TransactionReceiptWithDecodedLogs`", - "pr": 924 - }, - { - "note": "Added Transaction Encoder for use with 0x Exchange executeTransaction", - "pr": 975 - } - ], - "timestamp": 1535133899 - }, - { - "version": "1.0.1-rc.3", - "changes": [ - { - "pr": 915, - "note": "Added strict encoding/decoding checks for sendTransaction and call" - }, - { - "note": "Add ForwarderWrapper", - "pr": 934 - }, - { - "note": "Optimize orders in ForwarderWrapper", - "pr": 936 - } - ], - "timestamp": 1534210131 - }, - { - "version": "1.0.1-rc.2", - "changes": [ - { - "note": "Fixed bug caused by importing non-existent dep" - } - ], - "timestamp": 1532619515 - }, - { - "version": "1.0.1-rc.1", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1532605697 - }, - { - "timestamp": 1532357734, - "version": "1.0.0", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532043000, - "version": "1.0.0-rc.1", - "changes": [ - { - "note": "Update blockstream to v5.0 and propogate up caught errors to active subscriptions", - "pr": 815 - }, - { - "note": "Update to v2 of 0x rpotocol", - "pr": 822 - } - ] - }, - { - "timestamp": 1531919263, - "version": "0.1.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1529397769, - "version": "0.0.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1527617227, - "version": "0.0.4", - "changes": [ - { - "note": "Expose 'abi' ContractAbi property on all contract wrappers" - } - ] - }, - { - "version": "0.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1527008544 - }, - { - "timestamp": 1527008270, - "version": "0.0.1", - "changes": [ - { - "note": "Moved contractWrappers out of 0x.js", - "pr": 579 - } - ] - } -] diff --git a/packages/contract-wrappers/CHANGELOG.md b/packages/contract-wrappers/CHANGELOG.md deleted file mode 100644 index 28cbf2ec6..000000000 --- a/packages/contract-wrappers/CHANGELOG.md +++ /dev/null @@ -1,164 +0,0 @@ - - -CHANGELOG - -## v5.0.1 - _January 17, 2019_ - - * Dependencies updated - -## v5.0.0 - _January 15, 2019_ - - * Renamed OrderStatus enum members to PascalCase to conform with tslint enum-naming rule (#1474) - * Remove Exchange `matchOrdersAsync` optimization (#1514) - -## v4.2.1 - _January 11, 2019_ - - * Dependencies updated - -## v4.2.0 - _January 9, 2019_ - - * Added Dutch Auction wrapper (#1465) - -## v4.1.4 - _Invalid date_ - - * Add support for Trust Wallet signature denial error - * Add balance and allowance queries for `MultiAssetProxy` (#1363) - -## v4.1.3 - _December 13, 2018_ - - * Dependencies updated - -## v4.1.2 - _December 11, 2018_ - - * Dependencies updated - -## v4.1.1 - _November 28, 2018_ - - * Dependencies updated - -## v4.1.0 - _November 21, 2018_ - - * Add a `nonce` field for `TxOpts` so that it's now possible to re-broadcast stuck transactions with a higher gas amount (#1292) - -## v4.0.2 - _November 14, 2018_ - - * Dependencies updated - -## v4.0.1 - _November 13, 2018_ - - * Dependencies updated - -## v4.0.0 - _November 12, 2018_ - - * Add signature validation, regular cancellation and `cancelledUpTo` checks to `validateOrderFillableOrThrowAsync` (#1235) - * Improved the errors thrown by `validateOrderFillableOrThrowAsync` by making them more descriptive (#1235) - * Throw previously swallowed network errors when calling `validateOrderFillableOrThrowAsync` (see issue: #1218) (#1235) - -## v3.0.1 - _November 9, 2018_ - - * Fix bug in `ForwarderWrapper` where `feeRecipientAddress` was not correctly normalized. (#1178) - -## v3.0.0 - _October 18, 2018_ - - * Add optional validation to the forwarder wrapper methods - * Updated to use new modularized artifacts. (#1105) - * Top-level `ContractWrappers` class has a new optional `contractAddresses` parameter. (#1105) - * Default contract addresses are no longer stored in artifacts and are instead loaded from the `@0xproject/contract-addresses` package. (#1105) - * Most contract addresses are now defined at instantiation time and are available as properties (e.g., `exchangeWrapper.address`) instead of methods (e.g., `exchangeWrapper.getContractAddress()`). (#1105) - * Removed `setProvider` method in top-level `ContractWrapper` class and added new `unsubscribeAll` method. (#1105) - * Some properties and methods have been renamed. For example, some methods that previously could throw no longer can, and so their names have been updated accordingly. (#1105) - * Removed ContractNotFound errors. Checking for this error was somewhat ineffecient. Relevant methods/functions now return the default error from web3-wrapper, which we feel provides enough information. (#1105) - * Add `ForwarderWrapperError` to public interface (#1147) - * Add `ContractWrapperError.SignatureRequestDenied` to public interface (#1147) - -## v2.0.2 - _October 4, 2018_ - - * Dependencies updated - -## v2.0.1 - _September 28, 2018_ - - * Dependencies updated - -## v2.0.0 - _September 25, 2018_ - - * Fixes dropped events in subscriptions by fetching logs by blockHash instead of blockNumber. Support for fetching by blockHash was added in Geth > v1.8.13 and Parity > v2.1.0. Infura works too. (#1080) - * Fix misunderstanding about blockstream interface callbacks and pass the raw JSON RPC responses to it (#1080) - -## v1.0.5 - _September 25, 2018_ - - * Dependencies updated - -## v1.0.4 - _September 21, 2018_ - - * Dependencies updated - -## v1.0.3 - _September 19, 2018_ - - * Drastically reduce the bundle size by removing unused parts of included contract artifacts. - -## v1.0.2 - _September 18, 2018_ - - * Add ZRX & WETH mainnet contract addresses into the included artifacts - -## v1.0.1 - _September 5, 2018_ - - * Add `OrderValidatorWrapper` - * Fix bug where contracts not deployed on a network showed an `EXCHANGE_CONTRACT_DOES_NOT_EXIST` error instead of `CONTRACT_NOT_DEPLOYED_ON_NETWORK` (#1044) - * Export `AssetBalanceAndProxyAllowanceFetcher` and `OrderFilledCancelledFetcher` implementations (#1054) - * Add `validateOrderFillableOrThrowAsync` and `validateFillOrderThrowIfInvalidAsync` to ExchangeWrapper (#1054) - -## v1.0.1-rc.5 - _August 27, 2018_ - - * Fix missing `BlockParamLiteral` type import issue - -## v1.0.1-rc.4 - _August 24, 2018_ - - * Export missing types: `TransactionEncoder`, `ContractAbi`, `JSONRPCRequestPayload`, `JSONRPCResponsePayload`, `JSONRPCErrorCallback`, `AbiDefinition`, `FunctionAbi`, `EventAbi`, `EventParameter`, `DecodedLogArgs`, `MethodAbi`, `ConstructorAbi`, `FallbackAbi`, `DataItem`, `ConstructorStateMutability`, `StateMutability` & `ExchangeSignatureValidatorApprovalEventArgs` (#924) - * Remove superfluous exported types: `ContractEvent`, `Token`, `OrderFillRequest`, `ContractEventArgs`, `LogEvent`, `OnOrderStateChangeCallback`, `ECSignature`, `OrderStateValid`, `OrderStateInvalid`, `OrderState`, `FilterObject`, `TransactionReceipt` & `TransactionReceiptWithDecodedLogs` (#924) - * Added Transaction Encoder for use with 0x Exchange executeTransaction (#975) - -## v1.0.1-rc.3 - _August 14, 2018_ - - * Added strict encoding/decoding checks for sendTransaction and call (#915) - * Add ForwarderWrapper (#934) - * Optimize orders in ForwarderWrapper (#936) - -## v1.0.1-rc.2 - _July 26, 2018_ - - * Fixed bug caused by importing non-existent dep - -## v1.0.1-rc.1 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.0 - _July 23, 2018_ - - * Dependencies updated - -## v1.0.0-rc.1 - _July 19, 2018_ - - * Update blockstream to v5.0 and propogate up caught errors to active subscriptions (#815) - * Update to v2 of 0x rpotocol (#822) - -## v0.1.1 - _July 18, 2018_ - - * Dependencies updated - -## v0.0.5 - _June 19, 2018_ - - * Dependencies updated - -## v0.0.4 - _May 29, 2018_ - - * Expose 'abi' ContractAbi property on all contract wrappers - -## v0.0.2 - _May 22, 2018_ - - * Dependencies updated - -## v0.0.1 - _May 22, 2018_ - - * Moved contractWrappers out of 0x.js (#579) diff --git a/packages/contract-wrappers/README.md b/packages/contract-wrappers/README.md deleted file mode 100644 index 36f2f48fb..000000000 --- a/packages/contract-wrappers/README.md +++ /dev/null @@ -1,89 +0,0 @@ -## @0x/contract-wrappers - -Smart TS wrappers for 0x smart contracts. The wrappers have simplified interfaces, perform client-side validation on transactions and throw helpful error messages. - -### Read the [Documentation](https://0xproject.com/docs/0x.js). - -## Installation - -**Install** - -```bash -npm install @0x/contract-wrappers --save -``` - -**Import** - -```javascript -import { ContractWrappers } from '@0x/contract-wrappers'; -``` - -If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: - -```json -"compilerOptions": { - "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], -} -``` - -## Contributing - -We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. - -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. - -### Install dependencies - -If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: - -```bash -yarn config set workspaces-experimental true -``` - -Then install dependencies - -```bash -yarn install -``` - -### Build - -To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: - -```bash -PKG=@0x/contract-wrappers yarn build -``` - -Or continuously rebuild on change: - -```bash -PKG=@0x/contract-wrappers yarn watch -``` - -```bash -yarn build -``` - -or continuously rebuild on change: - -```bash -yarn watch -``` - -### Clean - -```bash -yarn clean -``` - -### Lint - -```bash -yarn lint -``` - -### Run Tests - -```bash -yarn test -``` diff --git a/packages/contract-wrappers/coverage/.gitkeep b/packages/contract-wrappers/coverage/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json deleted file mode 100644 index cc7dc1a3e..000000000 --- a/packages/contract-wrappers/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "name": "@0x/contract-wrappers", - "version": "5.0.1", - "description": "Smart TS wrappers for 0x smart contracts", - "keywords": [ - "0xproject", - "ethereum", - "tokens", - "exchange" - ], - "main": "lib/src/index.js", - "types": "lib/src/index.d.ts", - "scripts": { - "build": "tsc -b", - "build:ci": "yarn build", - "lint": "tslint --format stylish --project . --exclude **/lib/**/*", - "test:circleci": "run-s test:coverage", - "test": "yarn run_mocha", - "rebuild_and_test": "run-s build test", - "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", - "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "clean": "shx rm -rf _bundles lib test_temp generated_docs", - "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", - "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES" - }, - "config": { - "postpublish": { - "assets": [] - } - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo" - }, - "license": "Apache-2.0", - "engines": { - "node": ">=6.0.0" - }, - "devDependencies": { - "@0x/dev-utils": "^1.0.24", - "@0x/migrations": "^2.4.0", - "@0x/subproviders": "^2.1.11", - "@0x/tslint-config": "^2.0.2", - "@types/lodash": "4.14.104", - "@types/mocha": "^2.2.42", - "@types/node": "*", - "@types/sinon": "^2.2.2", - "@types/uuid": "^3.4.2", - "@types/web3-provider-engine": "^14.0.0", - "chai": "^4.0.1", - "chai-as-promised": "^7.1.0", - "chai-bignumber": "^3.0.0", - "dirty-chai": "^2.0.1", - "make-promises-safe": "^1.1.0", - "mocha": "^4.1.0", - "npm-run-all": "^4.1.2", - "nyc": "^11.0.1", - "opn-cli": "^3.1.0", - "shx": "^0.2.2", - "sinon": "^4.0.0", - "source-map-support": "^0.5.0", - "tslint": "5.11.0", - "typedoc": "0.13.0", - "typescript": "3.0.1", - "web3-provider-engine": "14.0.6" - }, - "dependencies": { - "@0x/abi-gen-wrappers": "^2.2.0", - "@0x/assert": "^1.0.23", - "@0x/contract-addresses": "^2.2.0", - "@0x/contract-artifacts": "^1.3.0", - "@0x/contracts-test-utils": "^2.0.1", - "@0x/fill-scenarios": "^1.1.2", - "@0x/json-schemas": "^2.1.7", - "@0x/order-utils": "^3.1.2", - "@0x/types": "^1.5.2", - "@0x/typescript-typings": "^3.0.8", - "@0x/utils": "^3.0.1", - "@0x/web3-wrapper": "^3.2.4", - "ethereum-types": "^1.1.6", - "ethereumjs-abi": "0.6.5", - "ethereumjs-blockstream": "6.0.0", - "ethereumjs-util": "^5.1.1", - "ethers": "~4.0.4", - "js-sha3": "^0.7.0", - "lodash": "^4.17.5", - "uuid": "^3.1.0" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/contract-wrappers/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts b/packages/contract-wrappers/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts deleted file mode 100644 index b095c8e79..000000000 --- a/packages/contract-wrappers/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BigNumber } from '@0x/utils'; - -export abstract class AbstractBalanceAndProxyAllowanceLazyStore { - public abstract async getBalanceAsync(tokenAddress: string, userAddress: string): Promise; - public abstract async getProxyAllowanceAsync(tokenAddress: string, userAddress: string): Promise; - public abstract setBalance(tokenAddress: string, userAddress: string, balance: BigNumber): void; - public abstract deleteBalance(tokenAddress: string, userAddress: string): void; - public abstract setProxyAllowance(tokenAddress: string, userAddress: string, proxyAllowance: BigNumber): void; - public abstract deleteProxyAllowance(tokenAddress: string, userAddress: string): void; - public abstract deleteAll(): void; -} diff --git a/packages/contract-wrappers/src/contract_wrappers.ts b/packages/contract-wrappers/src/contract_wrappers.ts deleted file mode 100644 index 4e594593e..000000000 --- a/packages/contract-wrappers/src/contract_wrappers.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { - ERC20Proxy, - ERC20Token, - ERC721Proxy, - ERC721Token, - Exchange, - Forwarder, - OrderValidator, - WETH9, -} from '@0x/contract-artifacts'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import { Provider } from 'ethereum-types'; -import * as _ from 'lodash'; - -import { DutchAuctionWrapper } from './contract_wrappers/dutch_auction_wrapper'; -import { ERC20ProxyWrapper } from './contract_wrappers/erc20_proxy_wrapper'; -import { ERC20TokenWrapper } from './contract_wrappers/erc20_token_wrapper'; -import { ERC721ProxyWrapper } from './contract_wrappers/erc721_proxy_wrapper'; -import { ERC721TokenWrapper } from './contract_wrappers/erc721_token_wrapper'; -import { EtherTokenWrapper } from './contract_wrappers/ether_token_wrapper'; -import { ExchangeWrapper } from './contract_wrappers/exchange_wrapper'; -import { ForwarderWrapper } from './contract_wrappers/forwarder_wrapper'; -import { OrderValidatorWrapper } from './contract_wrappers/order_validator_wrapper'; -import { ContractWrappersConfigSchema } from './schemas/contract_wrappers_config_schema'; -import { ContractWrappersConfig } from './types'; -import { assert } from './utils/assert'; -import { constants } from './utils/constants'; -import { _getDefaultContractAddresses } from './utils/contract_addresses'; - -/** - * The ContractWrappers class contains smart contract wrappers helpful when building on 0x protocol. - */ -export class ContractWrappers { - /** - * An instance of the ExchangeWrapper class containing methods for interacting with the 0x Exchange smart contract. - */ - public exchange: ExchangeWrapper; - /** - * An instance of the ERC20TokenWrapper class containing methods for interacting with any ERC20 token smart contract. - */ - public erc20Token: ERC20TokenWrapper; - /** - * An instance of the ERC721TokenWrapper class containing methods for interacting with any ERC721 token smart contract. - */ - 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 ERC20ProxyWrapper class containing methods for interacting with the - * erc20Proxy smart contract. - */ - public erc20Proxy: ERC20ProxyWrapper; - /** - * An instance of the ERC721ProxyWrapper class containing methods for interacting with the - * erc721Proxy smart contract. - */ - public erc721Proxy: ERC721ProxyWrapper; - /** - * An instance of the ForwarderWrapper class containing methods for interacting with any Forwarder smart contract. - */ - public forwarder: ForwarderWrapper; - /** - * An instance of the OrderValidatorWrapper class containing methods for interacting with any OrderValidator smart contract. - */ - public orderValidator: OrderValidatorWrapper; - /** - * An instance of the DutchAuctionWrapper class containing methods for interacting with any DutchAuction smart contract. - */ - public dutchAuction: DutchAuctionWrapper; - - private readonly _web3Wrapper: Web3Wrapper; - /** - * Instantiates a new ContractWrappers instance. - * @param provider The Provider instance you would like the contract-wrappers library to use for interacting with - * the Ethereum network. - * @param config The configuration object. Look up the type for the description. - * @return An instance of the ContractWrappers class. - */ - constructor(provider: Provider, config: ContractWrappersConfig) { - assert.isWeb3Provider('provider', provider); - assert.doesConformToSchema('config', config, ContractWrappersConfigSchema); - const txDefaults = { - gasPrice: config.gasPrice, - }; - this._web3Wrapper = new Web3Wrapper(provider, txDefaults); - const artifactsArray = [ - ERC20Proxy, - ERC20Token, - ERC721Proxy, - ERC721Token, - Exchange, - Forwarder, - OrderValidator, - WETH9, - ]; - _.forEach(artifactsArray, artifact => { - this._web3Wrapper.abiDecoder.addABI(artifact.compilerOutput.abi); - }); - const blockPollingIntervalMs = _.isUndefined(config.blockPollingIntervalMs) - ? constants.DEFAULT_BLOCK_POLLING_INTERVAL - : config.blockPollingIntervalMs; - const contractAddresses = _.isUndefined(config.contractAddresses) - ? _getDefaultContractAddresses(config.networkId) - : config.contractAddresses; - this.erc20Proxy = new ERC20ProxyWrapper(this._web3Wrapper, config.networkId, contractAddresses.erc20Proxy); - this.erc721Proxy = new ERC721ProxyWrapper(this._web3Wrapper, config.networkId, contractAddresses.erc721Proxy); - this.erc20Token = new ERC20TokenWrapper( - this._web3Wrapper, - config.networkId, - this.erc20Proxy, - blockPollingIntervalMs, - ); - this.erc721Token = new ERC721TokenWrapper( - this._web3Wrapper, - config.networkId, - this.erc721Proxy, - blockPollingIntervalMs, - ); - this.etherToken = new EtherTokenWrapper( - this._web3Wrapper, - config.networkId, - this.erc20Token, - blockPollingIntervalMs, - ); - this.exchange = new ExchangeWrapper( - this._web3Wrapper, - config.networkId, - this.erc20Token, - this.erc721Token, - contractAddresses.exchange, - contractAddresses.zrxToken, - blockPollingIntervalMs, - ); - this.forwarder = new ForwarderWrapper( - this._web3Wrapper, - config.networkId, - contractAddresses.forwarder, - contractAddresses.zrxToken, - contractAddresses.etherToken, - ); - this.orderValidator = new OrderValidatorWrapper( - this._web3Wrapper, - config.networkId, - contractAddresses.orderValidator, - ); - this.dutchAuction = new DutchAuctionWrapper( - this._web3Wrapper, - config.networkId, - contractAddresses.dutchAuction, - ); - } - /** - * Unsubscribes from all subscriptions for all contracts. - */ - public unsubscribeAll(): void { - this.exchange.unsubscribeAll(); - this.erc20Token.unsubscribeAll(); - this.erc721Token.unsubscribeAll(); - this.etherToken.unsubscribeAll(); - } - /** - * Get the provider instance currently used by contract-wrappers - * @return Web3 provider instance - */ - public getProvider(): Provider { - return this._web3Wrapper.getProvider(); - } -} diff --git a/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts deleted file mode 100644 index 749aaae10..000000000 --- a/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts +++ /dev/null @@ -1,198 +0,0 @@ -import { AbiDecoder, intervalUtils, logUtils } from '@0x/utils'; -import { marshaller, Web3Wrapper } from '@0x/web3-wrapper'; -import { - BlockParamLiteral, - ContractAbi, - FilterObject, - LogEntry, - LogWithDecodedArgs, - RawLog, - RawLogEntry, -} from 'ethereum-types'; -import { Block, BlockAndLogStreamer, Log } from 'ethereumjs-blockstream'; -import * as _ from 'lodash'; - -import { - BlockRange, - ContractEventArgs, - ContractEvents, - ContractWrappersError, - EventCallback, - IndexedFilterValues, -} from '../types'; -import { constants } from '../utils/constants'; -import { filterUtils } from '../utils/filter_utils'; - -export abstract class ContractWrapper { - public abstract abi: ContractAbi; - protected _networkId: number; - protected _web3Wrapper: Web3Wrapper; - private _blockAndLogStreamerIfExists: BlockAndLogStreamer | undefined; - private readonly _blockPollingIntervalMs: number; - private _blockAndLogStreamIntervalIfExists?: NodeJS.Timer; - private readonly _filters: { [filterToken: string]: FilterObject }; - private readonly _filterCallbacks: { - [filterToken: string]: EventCallback; - }; - 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; - this._blockPollingIntervalMs = _.isUndefined(blockPollingIntervalMs) - ? constants.DEFAULT_BLOCK_POLLING_INTERVAL - : blockPollingIntervalMs; - this._filters = {}; - this._filterCallbacks = {}; - this._blockAndLogStreamerIfExists = undefined; - this._onLogAddedSubscriptionToken = undefined; - this._onLogRemovedSubscriptionToken = undefined; - } - protected _unsubscribeAll(): void { - const filterTokens = _.keys(this._filterCallbacks); - _.each(filterTokens, filterToken => { - this._unsubscribe(filterToken); - }); - } - protected _unsubscribe(filterToken: string, err?: Error): void { - if (_.isUndefined(this._filters[filterToken])) { - throw new Error(ContractWrappersError.SubscriptionNotFound); - } - if (!_.isUndefined(err)) { - const callback = this._filterCallbacks[filterToken]; - callback(err, undefined); - } - delete this._filters[filterToken]; - delete this._filterCallbacks[filterToken]; - if (_.isEmpty(this._filters)) { - this._stopBlockAndLogStream(); - } - } - protected _subscribe( - address: string, - eventName: ContractEvents, - indexFilterValues: IndexedFilterValues, - abi: ContractAbi, - callback: EventCallback, - isVerbose: boolean = false, - ): string { - const filter = filterUtils.getFilter(address, eventName, indexFilterValues, abi); - if (_.isUndefined(this._blockAndLogStreamerIfExists)) { - this._startBlockAndLogStream(isVerbose); - } - const filterToken = filterUtils.generateUUID(); - this._filters[filterToken] = filter; - this._filterCallbacks[filterToken] = callback as EventCallback; - return filterToken; - } - protected async _getLogsAsync( - address: string, - eventName: ContractEvents, - blockRange: BlockRange, - indexFilterValues: IndexedFilterValues, - abi: ContractAbi, - ): Promise>> { - const filter = filterUtils.getFilter(address, eventName, indexFilterValues, abi, blockRange); - const logs = await this._web3Wrapper.getLogsAsync(filter); - const logsWithDecodedArguments = _.map(logs, this._tryToDecodeLogOrNoop.bind(this)); - return logsWithDecodedArguments; - } - protected _tryToDecodeLogOrNoop( - log: LogEntry, - ): LogWithDecodedArgs | RawLog { - const abiDecoder = new AbiDecoder([this.abi]); - const logWithDecodedArgs = abiDecoder.tryToDecodeLogOrNoop(log); - return logWithDecodedArgs; - } - private _onLogStateChanged(isRemoved: boolean, rawLog: RawLogEntry): void { - const log: LogEntry = marshaller.unmarshalLog(rawLog); - _.forEach(this._filters, (filter: FilterObject, filterToken: string) => { - if (filterUtils.matchesFilter(log, filter)) { - const decodedLog = this._tryToDecodeLogOrNoop(log) as LogWithDecodedArgs; - const logEvent = { - log: decodedLog, - isRemoved, - }; - this._filterCallbacks[filterToken](null, logEvent); - } - }); - } - private _startBlockAndLogStream(isVerbose: boolean): void { - if (!_.isUndefined(this._blockAndLogStreamerIfExists)) { - throw new Error(ContractWrappersError.SubscriptionAlreadyPresent); - } - this._blockAndLogStreamerIfExists = new BlockAndLogStreamer( - this._blockstreamGetBlockOrNullAsync.bind(this), - this._blockstreamGetLogsAsync.bind(this), - ContractWrapper._onBlockAndLogStreamerError.bind(this, isVerbose), - ); - const catchAllLogFilter = {}; - this._blockAndLogStreamerIfExists.addLogFilter(catchAllLogFilter); - this._blockAndLogStreamIntervalIfExists = intervalUtils.setAsyncExcludingInterval( - this._reconcileBlockAsync.bind(this), - this._blockPollingIntervalMs, - ContractWrapper._onBlockAndLogStreamerError.bind(this, isVerbose), - ); - let isRemoved = false; - this._onLogAddedSubscriptionToken = this._blockAndLogStreamerIfExists.subscribeToOnLogAdded( - this._onLogStateChanged.bind(this, isRemoved), - ); - isRemoved = true; - this._onLogRemovedSubscriptionToken = this._blockAndLogStreamerIfExists.subscribeToOnLogRemoved( - this._onLogStateChanged.bind(this, isRemoved), - ); - } - // This method only exists in order to comply with the expected interface of Blockstream's constructor - private async _blockstreamGetBlockOrNullAsync(hash: string): Promise { - const shouldIncludeTransactionData = false; - const blockOrNull = await this._web3Wrapper.sendRawPayloadAsync({ - method: 'eth_getBlockByHash', - params: [hash, shouldIncludeTransactionData], - }); - return blockOrNull; - } - // This method only exists in order to comply with the expected interface of Blockstream's constructor - private async _blockstreamGetLatestBlockOrNullAsync(): Promise { - const shouldIncludeTransactionData = false; - const blockOrNull = await this._web3Wrapper.sendRawPayloadAsync({ - method: 'eth_getBlockByNumber', - params: [BlockParamLiteral.Latest, shouldIncludeTransactionData], - }); - return blockOrNull; - } - // This method only exists in order to comply with the expected interface of Blockstream's constructor - private async _blockstreamGetLogsAsync(filterOptions: FilterObject): Promise { - const logs = await this._web3Wrapper.sendRawPayloadAsync({ - method: 'eth_getLogs', - params: [filterOptions], - }); - return logs as RawLogEntry[]; - } - private _stopBlockAndLogStream(): void { - if (_.isUndefined(this._blockAndLogStreamerIfExists)) { - throw new Error(ContractWrappersError.SubscriptionNotFound); - } - this._blockAndLogStreamerIfExists.unsubscribeFromOnLogAdded(this._onLogAddedSubscriptionToken as string); - this._blockAndLogStreamerIfExists.unsubscribeFromOnLogRemoved(this._onLogRemovedSubscriptionToken as string); - intervalUtils.clearAsyncExcludingInterval(this._blockAndLogStreamIntervalIfExists as NodeJS.Timer); - delete this._blockAndLogStreamerIfExists; - } - private async _reconcileBlockAsync(): Promise { - const latestBlockOrNull = await this._blockstreamGetLatestBlockOrNullAsync(); - if (_.isNull(latestBlockOrNull)) { - return; // noop - } - // We need to coerce to Block type cause Web3.Block includes types for mempool blocks - if (!_.isUndefined(this._blockAndLogStreamerIfExists)) { - // If we clear the interval while fetching the block - this._blockAndLogStreamer will be undefined - await this._blockAndLogStreamerIfExists.reconcileNewBlock(latestBlockOrNull); - } - } -} diff --git a/packages/contract-wrappers/src/contract_wrappers/dutch_auction_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/dutch_auction_wrapper.ts deleted file mode 100644 index c1aceff47..000000000 --- a/packages/contract-wrappers/src/contract_wrappers/dutch_auction_wrapper.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { DutchAuctionContract } from '@0x/abi-gen-wrappers'; -import { DutchAuction } from '@0x/contract-artifacts'; -import { schemas } from '@0x/json-schemas'; -import { assetDataUtils } from '@0x/order-utils'; -import { DutchAuctionDetails, SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import { ContractAbi } from 'ethereum-types'; -import * as ethAbi from 'ethereumjs-abi'; -import * as ethUtil from 'ethereumjs-util'; -import * as _ from 'lodash'; - -import { orderTxOptsSchema } from '../schemas/order_tx_opts_schema'; -import { txOptsSchema } from '../schemas/tx_opts_schema'; -import { DutchAuctionData, DutchAuctionWrapperError, OrderTransactionOpts } from '../types'; -import { assert } from '../utils/assert'; -import { _getDefaultContractAddresses } from '../utils/contract_addresses'; - -import { ContractWrapper } from './contract_wrapper'; - -export class DutchAuctionWrapper extends ContractWrapper { - public abi: ContractAbi = DutchAuction.compilerOutput.abi; - public address: string; - private _dutchAuctionContractIfExists?: DutchAuctionContract; - /** - * Dutch auction details are encoded with the asset data for a 0x order. This function produces a hex - * encoded assetData string, containing information both about the asset being traded and the - * dutch auction; which is usable in the makerAssetData or takerAssetData fields in a 0x order. - * @param assetData Hex encoded assetData string for the asset being auctioned. - * @param beginTimeSeconds Begin time of the dutch auction. - * @param beginAmount Starting amount being sold in the dutch auction. - * @return The hex encoded assetData string. - */ - public static encodeDutchAuctionAssetData( - assetData: string, - beginTimeSeconds: BigNumber, - beginAmount: BigNumber, - ): string { - const assetDataBuffer = ethUtil.toBuffer(assetData); - const abiEncodedAuctionData = (ethAbi as any).rawEncode( - ['uint256', 'uint256'], - [beginTimeSeconds.toString(), beginAmount.toString()], - ); - const abiEncodedAuctionDataBuffer = ethUtil.toBuffer(abiEncodedAuctionData); - const dutchAuctionDataBuffer = Buffer.concat([assetDataBuffer, abiEncodedAuctionDataBuffer]); - const dutchAuctionData = ethUtil.bufferToHex(dutchAuctionDataBuffer); - return dutchAuctionData; - } - /** - * Dutch auction details are encoded with the asset data for a 0x order. This function decodes a hex - * encoded assetData string, containing information both about the asset being traded and the - * dutch auction. - * @param dutchAuctionData Hex encoded assetData string for the asset being auctioned. - * @return An object containing the auction asset, auction begin time and auction begin amount. - */ - public static decodeDutchAuctionData(dutchAuctionData: string): DutchAuctionData { - const dutchAuctionDataBuffer = ethUtil.toBuffer(dutchAuctionData); - // Decode asset data - const dutchAuctionDataLengthInBytes = 64; - const assetDataBuffer = dutchAuctionDataBuffer.slice( - 0, - dutchAuctionDataBuffer.byteLength - dutchAuctionDataLengthInBytes, - ); - const assetDataHex = ethUtil.bufferToHex(assetDataBuffer); - const assetData = assetDataUtils.decodeAssetDataOrThrow(assetDataHex); - // Decode auction details - const dutchAuctionDetailsBuffer = dutchAuctionDataBuffer.slice( - dutchAuctionDataBuffer.byteLength - dutchAuctionDataLengthInBytes, - ); - const [beginTimeSecondsAsBN, beginAmountAsBN] = ethAbi.rawDecode( - ['uint256', 'uint256'], - dutchAuctionDetailsBuffer, - ); - const beginTimeSeconds = new BigNumber(`0x${beginTimeSecondsAsBN.toString()}`); - const beginAmount = new BigNumber(`0x${beginAmountAsBN.toString()}`); - return { - assetData, - beginTimeSeconds, - beginAmount, - }; - } - /** - * Instantiate DutchAuctionWrapper - * @param web3Wrapper Web3Wrapper instance to use. - * @param networkId Desired networkId. - * @param address The address of the Dutch Auction contract. If undefined, will - * default to the known address corresponding to the networkId. - */ - public constructor(web3Wrapper: Web3Wrapper, networkId: number, address?: string) { - super(web3Wrapper, networkId); - this.address = _.isUndefined(address) ? _getDefaultContractAddresses(networkId).dutchAuction : address; - } - /** - * Matches the buy and sell orders at an amount given the following: the current block time, the auction - * start time and the auction begin amount. The sell order is a an order at the lowest amount - * at the end of the auction. Excess from the match is transferred to the seller. - * Over time the price moves from beginAmount to endAmount given the current block.timestamp. - * @param buyOrder The Buyer's order. This order is for the current expected price of the auction. - * @param sellOrder The Seller's order. This order is for the lowest amount (at the end of the auction). - * @param takerAddress The user Ethereum address who would like to fill this order. Must be available via the supplied - * Provider provided at instantiation. - * @return Transaction hash. - */ - public async matchOrdersAsync( - buyOrder: SignedOrder, - sellOrder: SignedOrder, - takerAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - // type assertions - assert.doesConformToSchema('buyOrder', buyOrder, schemas.signedOrderSchema); - assert.doesConformToSchema('sellOrder', sellOrder, schemas.signedOrderSchema); - await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedTakerAddress = takerAddress.toLowerCase(); - // other assertions - if ( - sellOrder.makerAssetData !== buyOrder.takerAssetData || - sellOrder.takerAssetData !== buyOrder.makerAssetData - ) { - throw new Error(DutchAuctionWrapperError.AssetDataMismatch); - } - // get contract - const dutchAuctionInstance = await this._getDutchAuctionContractAsync(); - // validate transaction - if (orderTransactionOpts.shouldValidate) { - await dutchAuctionInstance.matchOrders.callAsync( - buyOrder, - sellOrder, - buyOrder.signature, - sellOrder.signature, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - } - // send transaction - const txHash = await dutchAuctionInstance.matchOrders.sendTransactionAsync( - buyOrder, - sellOrder, - buyOrder.signature, - sellOrder.signature, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * Fetches the Auction Details for the given order - * @param sellOrder The Seller's order. This order is for the lowest amount (at the end of the auction). - * @return The dutch auction details. - */ - public async getAuctionDetailsAsync(sellOrder: SignedOrder): Promise { - // type assertions - assert.doesConformToSchema('sellOrder', sellOrder, schemas.signedOrderSchema); - // get contract - const dutchAuctionInstance = await this._getDutchAuctionContractAsync(); - // call contract - const auctionDetails = await dutchAuctionInstance.getAuctionDetails.callAsync(sellOrder); - return auctionDetails; - } - private async _getDutchAuctionContractAsync(): Promise { - if (!_.isUndefined(this._dutchAuctionContractIfExists)) { - return this._dutchAuctionContractIfExists; - } - const contractInstance = new DutchAuctionContract( - this.abi, - this.address, - this._web3Wrapper.getProvider(), - this._web3Wrapper.getContractDefaults(), - ); - this._dutchAuctionContractIfExists = contractInstance; - return this._dutchAuctionContractIfExists; - } -} diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts deleted file mode 100644 index 45460bd6d..000000000 --- a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { ERC20ProxyContract } from '@0x/abi-gen-wrappers'; -import { ERC20Proxy } from '@0x/contract-artifacts'; -import { AssetProxyId } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import { ContractAbi } from 'ethereum-types'; -import * as _ from 'lodash'; - -import { assert } from '../utils/assert'; -import { _getDefaultContractAddresses } from '../utils/contract_addresses'; - -import { ContractWrapper } from './contract_wrapper'; - -/** - * This class includes the functionality related to interacting with the ERC20Proxy contract. - */ -export class ERC20ProxyWrapper extends ContractWrapper { - public abi: ContractAbi = ERC20Proxy.compilerOutput.abi; - public address: string; - private _erc20ProxyContractIfExists?: ERC20ProxyContract; - /** - * Instantiate ERC20ProxyWrapper - * @param web3Wrapper Web3Wrapper instance to use - * @param networkId Desired networkId - * @param address The address of the ERC20Proxy contract. If undefined, will - * default to the known address corresponding to the networkId. - */ - constructor(web3Wrapper: Web3Wrapper, networkId: number, address?: string) { - super(web3Wrapper, networkId); - this.address = _.isUndefined(address) ? _getDefaultContractAddresses(networkId).erc20Proxy : address; - } - /** - * Get the 4 bytes ID of this asset proxy - * @return Proxy id - */ - public async getProxyIdAsync(): Promise { - const ERC20ProxyContractInstance = this._getERC20ProxyContract(); - // Note(albrow): Below is a TSLint false positive. Code won't compile if - // you remove the type assertion. - /* tslint:disable-next-line:no-unnecessary-type-assertion */ - const proxyId = (await ERC20ProxyContractInstance.getProxyId.callAsync()) as AssetProxyId; - return proxyId; - } - /** - * Check if the Exchange contract address is authorized by the ERC20Proxy contract. - * @param exchangeContractAddress The hex encoded address of the Exchange contract to call. - * @return Whether the exchangeContractAddress is authorized. - */ - public async isAuthorizedAsync(exchangeContractAddress: string): Promise { - assert.isETHAddressHex('exchangeContractAddress', exchangeContractAddress); - const normalizedExchangeContractAddress = exchangeContractAddress.toLowerCase(); - const ERC20ProxyContractInstance = this._getERC20ProxyContract(); - const isAuthorized = await ERC20ProxyContractInstance.authorized.callAsync(normalizedExchangeContractAddress); - return isAuthorized; - } - /** - * Get the list of all Exchange contract addresses authorized by the ERC20Proxy contract. - * @return The list of authorized addresses. - */ - public async getAuthorizedAddressesAsync(): Promise { - const ERC20ProxyContractInstance = this._getERC20ProxyContract(); - const authorizedAddresses = await ERC20ProxyContractInstance.getAuthorizedAddresses.callAsync(); - return authorizedAddresses; - } - private _getERC20ProxyContract(): ERC20ProxyContract { - if (!_.isUndefined(this._erc20ProxyContractIfExists)) { - return this._erc20ProxyContractIfExists; - } - const contractInstance = new ERC20ProxyContract( - this.abi, - this.address, - this._web3Wrapper.getProvider(), - this._web3Wrapper.getContractDefaults(), - ); - this._erc20ProxyContractIfExists = contractInstance; - return this._erc20ProxyContractIfExists; - } -} diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts deleted file mode 100644 index cd79a0e5d..000000000 --- a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts +++ /dev/null @@ -1,443 +0,0 @@ -import { ERC20TokenContract, ERC20TokenEventArgs, ERC20TokenEvents } from '@0x/abi-gen-wrappers'; -import { ERC20Token } from '@0x/contract-artifacts'; -import { schemas } from '@0x/json-schemas'; -import { BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import { ContractAbi, LogWithDecodedArgs } from 'ethereum-types'; -import * as _ from 'lodash'; - -import { methodOptsSchema } from '../schemas/method_opts_schema'; -import { txOptsSchema } from '../schemas/tx_opts_schema'; -import { - BlockRange, - ContractWrappersError, - EventCallback, - IndexedFilterValues, - MethodOpts, - TransactionOpts, -} from '../types'; -import { assert } from '../utils/assert'; -import { constants } from '../utils/constants'; -import { utils } from '../utils/utils'; - -import { ContractWrapper } from './contract_wrapper'; -import { ERC20ProxyWrapper } from './erc20_proxy_wrapper'; - -/** - * This class includes all the functionality related to interacting with ERC20 token contracts. - * All ERC20 method calls are supported, along with some convenience methods for getting/setting allowances - * to the 0x ERC20 Proxy smart contract. - */ -export class ERC20TokenWrapper extends ContractWrapper { - public abi: ContractAbi = ERC20Token.compilerOutput.abi; - public UNLIMITED_ALLOWANCE_IN_BASE_UNITS = constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS; - private readonly _tokenContractsByAddress: { [address: string]: ERC20TokenContract }; - private readonly _erc20ProxyWrapper: ERC20ProxyWrapper; - /** - * Instantiate ERC20TokenWrapper - * @param web3Wrapper Web3Wrapper instance to use - * @param networkId Desired networkId - * @param erc20ProxyWrapper The ERC20ProxyWrapper instance to use - * @param blockPollingIntervalMs The block polling interval to use for active subscriptions - */ - constructor( - web3Wrapper: Web3Wrapper, - networkId: number, - erc20ProxyWrapper: ERC20ProxyWrapper, - blockPollingIntervalMs?: number, - ) { - super(web3Wrapper, networkId, blockPollingIntervalMs); - this._tokenContractsByAddress = {}; - this._erc20ProxyWrapper = erc20ProxyWrapper; - } - /** - * Retrieves an owner's ERC20 token balance. - * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. - * @param ownerAddress The hex encoded user Ethereum address whose balance you would like to check. - * @param methodOpts Optional arguments this method accepts. - * @return The owner's ERC20 token balance in base units. - */ - public async getBalanceAsync( - tokenAddress: string, - ownerAddress: string, - methodOpts: MethodOpts = {}, - ): Promise { - assert.isETHAddressHex('ownerAddress', ownerAddress); - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - const normalizedOwnerAddress = ownerAddress.toLowerCase(); - - const tokenContract = await this._getTokenContractAsync(normalizedTokenAddress); - - const txData = {}; - let balance = await tokenContract.balanceOf.callAsync(normalizedOwnerAddress, txData, methodOpts.defaultBlock); - // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber - balance = new BigNumber(balance); - return balance; - } - /** - * Sets the spender's allowance to a specified number of baseUnits on behalf of the owner address. - * Equivalent to the ERC20 spec method `approve`. - * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. - * @param ownerAddress The hex encoded user Ethereum address who would like to set an allowance - * for spenderAddress. - * @param spenderAddress The hex encoded user Ethereum address who will be able to spend the set allowance. - * @param amountInBaseUnits The allowance amount you would like to set. - * @param txOpts Transaction parameters. - * @return Transaction hash. - */ - public async setAllowanceAsync( - tokenAddress: string, - ownerAddress: string, - spenderAddress: string, - amountInBaseUnits: BigNumber, - txOpts: TransactionOpts = {}, - ): Promise { - assert.isETHAddressHex('tokenAddress', tokenAddress); - await assert.isSenderAddressAsync('ownerAddress', ownerAddress, this._web3Wrapper); - assert.isETHAddressHex('spenderAddress', spenderAddress); - assert.isValidBaseUnitAmount('amountInBaseUnits', amountInBaseUnits); - assert.doesConformToSchema('txOpts', txOpts, txOptsSchema); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - const normalizedOwnerAddress = ownerAddress.toLowerCase(); - const normalizedSpenderAddress = spenderAddress.toLowerCase(); - - const tokenContract = await this._getTokenContractAsync(normalizedTokenAddress); - const txHash = await tokenContract.approve.sendTransactionAsync( - normalizedSpenderAddress, - amountInBaseUnits, - utils.removeUndefinedProperties({ - from: normalizedOwnerAddress, - gas: txOpts.gasLimit, - gasPrice: txOpts.gasPrice, - nonce: txOpts.nonce, - }), - ); - return txHash; - } - /** - * Sets the spender's allowance to an unlimited number of baseUnits on behalf of the owner address. - * Equivalent to the ERC20 spec method `approve`. - * Setting an unlimited allowance will lower the gas cost for filling orders involving tokens that forego updating - * allowances set to the max amount (e.g ZRX, WETH) - * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. - * @param ownerAddress The hex encoded user Ethereum address who would like to set an allowance - * for spenderAddress. - * @param spenderAddress The hex encoded user Ethereum address who will be able to spend the set allowance. - * @param txOpts Transaction parameters. - * @return Transaction hash. - */ - public async setUnlimitedAllowanceAsync( - tokenAddress: string, - ownerAddress: string, - spenderAddress: string, - txOpts: TransactionOpts = {}, - ): Promise { - const txHash = await this.setAllowanceAsync( - tokenAddress, - ownerAddress, - spenderAddress, - this.UNLIMITED_ALLOWANCE_IN_BASE_UNITS, - txOpts, - ); - return txHash; - } - /** - * Retrieves the owners allowance in baseUnits set to the spender's address. - * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. - * @param ownerAddress The hex encoded user Ethereum address whose allowance to spenderAddress - * you would like to retrieve. - * @param spenderAddress The hex encoded user Ethereum address who can spend the allowance you are fetching. - * @param methodOpts Optional arguments this method accepts. - */ - public async getAllowanceAsync( - tokenAddress: string, - ownerAddress: string, - spenderAddress: string, - methodOpts: MethodOpts = {}, - ): Promise { - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.isETHAddressHex('ownerAddress', ownerAddress); - assert.isETHAddressHex('spenderAddress', spenderAddress); - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - const normalizedOwnerAddress = ownerAddress.toLowerCase(); - const normalizedSpenderAddress = spenderAddress.toLowerCase(); - - const tokenContract = await this._getTokenContractAsync(normalizedTokenAddress); - - const txData = {}; - let allowanceInBaseUnits = await tokenContract.allowance.callAsync( - normalizedOwnerAddress, - normalizedSpenderAddress, - txData, - methodOpts.defaultBlock, - ); - // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber - allowanceInBaseUnits = new BigNumber(allowanceInBaseUnits); - return allowanceInBaseUnits; - } - /** - * Retrieves the owner's allowance in baseUnits set to the 0x proxy contract. - * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. - * @param ownerAddress The hex encoded user Ethereum address whose proxy contract allowance we are retrieving. - * @param methodOpts Optional arguments this method accepts. - */ - public async getProxyAllowanceAsync( - tokenAddress: string, - ownerAddress: string, - methodOpts: MethodOpts = {}, - ): Promise { - const proxyAddress = this._erc20ProxyWrapper.address; - const allowanceInBaseUnits = await this.getAllowanceAsync(tokenAddress, ownerAddress, proxyAddress, methodOpts); - return allowanceInBaseUnits; - } - /** - * Sets the 0x proxy contract's allowance to a specified number of a tokens' baseUnits on behalf - * of an owner address. - * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. - * @param ownerAddress The hex encoded user Ethereum address who is setting an allowance - * for the Proxy contract. - * @param amountInBaseUnits The allowance amount specified in baseUnits. - * @param txOpts Transaction parameters. - * @return Transaction hash. - */ - public async setProxyAllowanceAsync( - tokenAddress: string, - ownerAddress: string, - amountInBaseUnits: BigNumber, - txOpts: TransactionOpts = {}, - ): Promise { - const proxyAddress = this._erc20ProxyWrapper.address; - const txHash = await this.setAllowanceAsync( - tokenAddress, - ownerAddress, - proxyAddress, - amountInBaseUnits, - txOpts, - ); - return txHash; - } - /** - * Sets the 0x proxy contract's allowance to a unlimited number of a tokens' baseUnits on behalf - * of an owner address. - * Setting an unlimited allowance will lower the gas cost for filling orders involving tokens that forego updating - * allowances set to the max amount (e.g ZRX, WETH) - * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. - * @param ownerAddress The hex encoded user Ethereum address who is setting an allowance - * for the Proxy contract. - * @param txOpts Transaction parameters. - * @return Transaction hash. - */ - public async setUnlimitedProxyAllowanceAsync( - tokenAddress: string, - ownerAddress: string, - txOpts: TransactionOpts = {}, - ): Promise { - const txHash = await this.setProxyAllowanceAsync( - tokenAddress, - ownerAddress, - this.UNLIMITED_ALLOWANCE_IN_BASE_UNITS, - txOpts, - ); - return txHash; - } - /** - * Transfers `amountInBaseUnits` ERC20 tokens from `fromAddress` to `toAddress`. - * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. - * @param fromAddress The hex encoded user Ethereum address that will send the funds. - * @param toAddress The hex encoded user Ethereum address that will receive the funds. - * @param amountInBaseUnits The amount (specified in baseUnits) of the token to transfer. - * @param txOpts Transaction parameters. - * @return Transaction hash. - */ - public async transferAsync( - tokenAddress: string, - fromAddress: string, - toAddress: string, - amountInBaseUnits: BigNumber, - txOpts: TransactionOpts = {}, - ): Promise { - assert.isETHAddressHex('tokenAddress', tokenAddress); - await assert.isSenderAddressAsync('fromAddress', fromAddress, this._web3Wrapper); - assert.isETHAddressHex('toAddress', toAddress); - assert.isValidBaseUnitAmount('amountInBaseUnits', amountInBaseUnits); - assert.doesConformToSchema('txOpts', txOpts, txOptsSchema); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - const normalizedFromAddress = fromAddress.toLowerCase(); - const normalizedToAddress = toAddress.toLowerCase(); - - const tokenContract = await this._getTokenContractAsync(normalizedTokenAddress); - - const fromAddressBalance = await this.getBalanceAsync(normalizedTokenAddress, normalizedFromAddress); - if (fromAddressBalance.isLessThan(amountInBaseUnits)) { - throw new Error(ContractWrappersError.InsufficientBalanceForTransfer); - } - - const txHash = await tokenContract.transfer.sendTransactionAsync( - normalizedToAddress, - amountInBaseUnits, - utils.removeUndefinedProperties({ - from: normalizedFromAddress, - gas: txOpts.gasLimit, - gasPrice: txOpts.gasPrice, - nonce: txOpts.nonce, - }), - ); - return txHash; - } - /** - * Transfers `amountInBaseUnits` ERC20 tokens from `fromAddress` to `toAddress`. - * Requires the fromAddress to have sufficient funds and to have approved an allowance of - * `amountInBaseUnits` to `senderAddress`. - * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. - * @param fromAddress The hex encoded user Ethereum address whose funds are being sent. - * @param toAddress The hex encoded user Ethereum address that will receive the funds. - * @param senderAddress The hex encoded user Ethereum address whose initiates the fund transfer. The - * `fromAddress` must have set an allowance to the `senderAddress` - * before this call. - * @param amountInBaseUnits The amount (specified in baseUnits) of the token to transfer. - * @param txOpts Transaction parameters. - * @return Transaction hash. - */ - public async transferFromAsync( - tokenAddress: string, - fromAddress: string, - toAddress: string, - senderAddress: string, - amountInBaseUnits: BigNumber, - txOpts: TransactionOpts = {}, - ): Promise { - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.isETHAddressHex('fromAddress', fromAddress); - assert.isETHAddressHex('toAddress', toAddress); - await assert.isSenderAddressAsync('senderAddress', senderAddress, this._web3Wrapper); - assert.isValidBaseUnitAmount('amountInBaseUnits', amountInBaseUnits); - assert.doesConformToSchema('txOpts', txOpts, txOptsSchema); - const normalizedToAddress = toAddress.toLowerCase(); - const normalizedFromAddress = fromAddress.toLowerCase(); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - const normalizedSenderAddress = senderAddress.toLowerCase(); - - const tokenContract = await this._getTokenContractAsync(normalizedTokenAddress); - - const fromAddressAllowance = await this.getAllowanceAsync( - normalizedTokenAddress, - normalizedFromAddress, - normalizedSenderAddress, - ); - if (fromAddressAllowance.isLessThan(amountInBaseUnits)) { - throw new Error(ContractWrappersError.InsufficientAllowanceForTransfer); - } - - const fromAddressBalance = await this.getBalanceAsync(normalizedTokenAddress, normalizedFromAddress); - if (fromAddressBalance.isLessThan(amountInBaseUnits)) { - throw new Error(ContractWrappersError.InsufficientBalanceForTransfer); - } - - const txHash = await tokenContract.transferFrom.sendTransactionAsync( - normalizedFromAddress, - normalizedToAddress, - amountInBaseUnits, - utils.removeUndefinedProperties({ - from: normalizedSenderAddress, - gas: txOpts.gasLimit, - gasPrice: txOpts.gasPrice, - nonce: txOpts.nonce, - }), - ); - return txHash; - } - /** - * Subscribe to an event type emitted by the Token contract. - * @param tokenAddress The hex encoded address where the ERC20 token is deployed. - * @param eventName The token contract event you would like to subscribe to. - * @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( - tokenAddress: string, - eventName: ERC20TokenEvents, - indexFilterValues: IndexedFilterValues, - callback: EventCallback, - isVerbose: boolean = false, - ): string { - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.doesBelongToStringEnum('eventName', eventName, ERC20TokenEvents); - assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema); - assert.isFunction('callback', callback); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - const subscriptionToken = this._subscribe( - normalizedTokenAddress, - eventName, - indexFilterValues, - ERC20Token.compilerOutput.abi, - callback, - isVerbose, - ); - return subscriptionToken; - } - /** - * Cancel a subscription - * @param subscriptionToken Subscription token returned by `subscribe()` - */ - public unsubscribe(subscriptionToken: string): void { - assert.isValidSubscriptionToken('subscriptionToken', subscriptionToken); - this._unsubscribe(subscriptionToken); - } - /** - * Cancels all existing subscriptions - */ - public unsubscribeAll(): void { - super._unsubscribeAll(); - } - /** - * Gets historical logs without creating a subscription - * @param tokenAddress An address of the token that emitted the logs. - * @param eventName The token contract event you would like to subscribe to. - * @param blockRange Block range to get logs from. - * @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 `{_from: aUserAddressHex}` - * @return Array of logs that match the parameters - */ - public async getLogsAsync( - tokenAddress: string, - eventName: ERC20TokenEvents, - blockRange: BlockRange, - indexFilterValues: IndexedFilterValues, - ): Promise>> { - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.doesBelongToStringEnum('eventName', eventName, ERC20TokenEvents); - assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema); - assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - const logs = await this._getLogsAsync( - normalizedTokenAddress, - eventName, - blockRange, - indexFilterValues, - ERC20Token.compilerOutput.abi, - ); - return logs; - } - private async _getTokenContractAsync(tokenAddress: string): Promise { - const normalizedTokenAddress = tokenAddress.toLowerCase(); - let tokenContract = this._tokenContractsByAddress[normalizedTokenAddress]; - if (!_.isUndefined(tokenContract)) { - return tokenContract; - } - const contractInstance = new ERC20TokenContract( - this.abi, - normalizedTokenAddress, - this._web3Wrapper.getProvider(), - this._web3Wrapper.getContractDefaults(), - ); - tokenContract = contractInstance; - this._tokenContractsByAddress[normalizedTokenAddress] = tokenContract; - return tokenContract; - } -} diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts deleted file mode 100644 index 12758e191..000000000 --- a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { ERC721ProxyContract } from '@0x/abi-gen-wrappers'; -import { ERC721Proxy } from '@0x/contract-artifacts'; -import { AssetProxyId } from '@0x/types'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import { ContractAbi } from 'ethereum-types'; -import * as _ from 'lodash'; - -import { assert } from '../utils/assert'; -import { _getDefaultContractAddresses } from '../utils/contract_addresses'; - -import { ContractWrapper } from './contract_wrapper'; - -/** - * This class includes the functionality related to interacting with the ERC721Proxy contract. - */ -export class ERC721ProxyWrapper extends ContractWrapper { - public abi: ContractAbi = ERC721Proxy.compilerOutput.abi; - public address: string; - private _erc721ProxyContractIfExists?: ERC721ProxyContract; - /** - * Instantiate ERC721ProxyWrapper - * @param web3Wrapper Web3Wrapper instance to use - * @param networkId Desired networkId - * @param address The address of the ERC721Proxy contract. If undefined, - * will default to the known address corresponding to the networkId. - */ - constructor(web3Wrapper: Web3Wrapper, networkId: number, address?: string) { - super(web3Wrapper, networkId); - this.address = _.isUndefined(address) ? _getDefaultContractAddresses(networkId).erc721Proxy : address; - } - /** - * Get the 4 bytes ID of this asset proxy - * @return Proxy id - */ - public async getProxyIdAsync(): Promise { - const ERC721ProxyContractInstance = await this._getERC721ProxyContract(); - // Note(albrow): Below is a TSLint false positive. Code won't compile if - // you remove the type assertion. - /* tslint:disable-next-line:no-unnecessary-type-assertion */ - const proxyId = (await ERC721ProxyContractInstance.getProxyId.callAsync()) as AssetProxyId; - return proxyId; - } - /** - * Check if the Exchange contract address is authorized by the ERC721Proxy contract. - * @param exchangeContractAddress The hex encoded address of the Exchange contract to call. - * @return Whether the exchangeContractAddress is authorized. - */ - public async isAuthorizedAsync(exchangeContractAddress: string): Promise { - assert.isETHAddressHex('exchangeContractAddress', exchangeContractAddress); - const normalizedExchangeContractAddress = exchangeContractAddress.toLowerCase(); - const ERC721ProxyContractInstance = await this._getERC721ProxyContract(); - const isAuthorized = await ERC721ProxyContractInstance.authorized.callAsync(normalizedExchangeContractAddress); - return isAuthorized; - } - /** - * Get the list of all Exchange contract addresses authorized by the ERC721Proxy contract. - * @return The list of authorized addresses. - */ - public async getAuthorizedAddressesAsync(): Promise { - const ERC721ProxyContractInstance = await this._getERC721ProxyContract(); - const authorizedAddresses = await ERC721ProxyContractInstance.getAuthorizedAddresses.callAsync(); - return authorizedAddresses; - } - private _getERC721ProxyContract(): ERC721ProxyContract { - if (!_.isUndefined(this._erc721ProxyContractIfExists)) { - return this._erc721ProxyContractIfExists; - } - const contractInstance = new ERC721ProxyContract( - this.abi, - this.address, - this._web3Wrapper.getProvider(), - this._web3Wrapper.getContractDefaults(), - ); - this._erc721ProxyContractIfExists = contractInstance; - return this._erc721ProxyContractIfExists; - } -} diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts deleted file mode 100644 index 3bc7dc8e7..000000000 --- a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts +++ /dev/null @@ -1,470 +0,0 @@ -import { ERC721TokenContract, ERC721TokenEventArgs, ERC721TokenEvents } from '@0x/abi-gen-wrappers'; -import { ERC721Token } from '@0x/contract-artifacts'; -import { schemas } from '@0x/json-schemas'; -import { BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import { ContractAbi, LogWithDecodedArgs } from 'ethereum-types'; -import * as _ from 'lodash'; - -import { methodOptsSchema } from '../schemas/method_opts_schema'; -import { txOptsSchema } from '../schemas/tx_opts_schema'; -import { - BlockRange, - ContractWrappersError, - EventCallback, - IndexedFilterValues, - MethodOpts, - TransactionOpts, -} from '../types'; -import { assert } from '../utils/assert'; -import { constants } from '../utils/constants'; -import { utils } from '../utils/utils'; - -import { ContractWrapper } from './contract_wrapper'; -import { ERC721ProxyWrapper } from './erc721_proxy_wrapper'; - -/** - * This class includes all the functionality related to interacting with ERC721 token contracts. - * All ERC721 method calls are supported, along with some convenience methods for getting/setting allowances - * to the 0x ERC721 Proxy smart contract. - */ -export class ERC721TokenWrapper extends ContractWrapper { - public abi: ContractAbi = ERC721Token.compilerOutput.abi; - private readonly _tokenContractsByAddress: { [address: string]: ERC721TokenContract }; - private readonly _erc721ProxyWrapper: ERC721ProxyWrapper; - /** - * Instantiate ERC721TokenWrapper - * @param web3Wrapper Web3Wrapper instance to use - * @param networkId Desired networkId - * @param erc721ProxyWrapper The ERC721ProxyWrapper instance to use - * @param blockPollingIntervalMs The block polling interval to use for active subscriptions - */ - constructor( - web3Wrapper: Web3Wrapper, - networkId: number, - erc721ProxyWrapper: ERC721ProxyWrapper, - blockPollingIntervalMs?: number, - ) { - super(web3Wrapper, networkId, blockPollingIntervalMs); - this._tokenContractsByAddress = {}; - this._erc721ProxyWrapper = erc721ProxyWrapper; - } - /** - * Count all NFTs assigned to an owner - * NFTs assigned to the zero address are considered invalid, and this function throws for queries about the zero address. - * @param tokenAddress The hex encoded contract Ethereum address where the ERC721 token is deployed. - * @param ownerAddress The hex encoded user Ethereum address whose balance you would like to check. - * @param methodOpts Optional arguments this method accepts. - * @return The number of NFTs owned by `ownerAddress`, possibly zero - */ - public async getTokenCountAsync( - tokenAddress: string, - ownerAddress: string, - methodOpts: MethodOpts = {}, - ): Promise { - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.isETHAddressHex('ownerAddress', ownerAddress); - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - const normalizedOwnerAddress = ownerAddress.toLowerCase(); - - const tokenContract = await this._getTokenContractAsync(normalizedTokenAddress); - - const txData = {}; - let balance = await tokenContract.balanceOf.callAsync(normalizedOwnerAddress, txData, methodOpts.defaultBlock); - // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber - balance = new BigNumber(balance); - return balance; - } - /** - * Find the owner of an NFT - * NFTs assigned to zero address are considered invalid, and queries about them do throw. - * @param tokenAddress The hex encoded contract Ethereum address where the ERC721 token is deployed. - * @param tokenId The identifier for an NFT - * @param methodOpts Optional arguments this method accepts. - * @return The address of the owner of the NFT - */ - public async getOwnerOfAsync( - tokenAddress: string, - tokenId: BigNumber, - methodOpts: MethodOpts = {}, - ): Promise { - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.isBigNumber('tokenId', tokenId); - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - - const tokenContract = await this._getTokenContractAsync(normalizedTokenAddress); - - const txData = {}; - try { - const tokenOwner = await tokenContract.ownerOf.callAsync(tokenId, txData, methodOpts.defaultBlock); - return tokenOwner; - } catch (err) { - throw new Error(ContractWrappersError.ERC721OwnerNotFound); - } - } - /** - * Query if an address is an authorized operator for all NFT's of `ownerAddress` - * @param tokenAddress The hex encoded contract Ethereum address where the ERC721 token is deployed. - * @param ownerAddress The hex encoded user Ethereum address of the token owner. - * @param operatorAddress The hex encoded user Ethereum address of the operator you'd like to check if approved. - * @param methodOpts Optional arguments this method accepts. - * @return True if `operatorAddress` is an approved operator for `ownerAddress`, false otherwise - */ - public async isApprovedForAllAsync( - tokenAddress: string, - ownerAddress: string, - operatorAddress: string, - methodOpts: MethodOpts = {}, - ): Promise { - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.isETHAddressHex('ownerAddress', ownerAddress); - assert.isETHAddressHex('operatorAddress', operatorAddress); - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - const normalizedOwnerAddress = ownerAddress.toLowerCase(); - const normalizedOperatorAddress = operatorAddress.toLowerCase(); - - const tokenContract = await this._getTokenContractAsync(normalizedTokenAddress); - - const txData = {}; - const isApprovedForAll = await tokenContract.isApprovedForAll.callAsync( - normalizedOwnerAddress, - normalizedOperatorAddress, - txData, - methodOpts.defaultBlock, - ); - return isApprovedForAll; - } - /** - * Query if 0x proxy is an authorized operator for all NFT's of `ownerAddress` - * @param tokenAddress The hex encoded contract Ethereum address where the ERC721 token is deployed. - * @param ownerAddress The hex encoded user Ethereum address of the token owner. - * @param methodOpts Optional arguments this method accepts. - * @return True if `operatorAddress` is an approved operator for `ownerAddress`, false otherwise - */ - public async isProxyApprovedForAllAsync( - tokenAddress: string, - ownerAddress: string, - methodOpts: MethodOpts = {}, - ): Promise { - const proxyAddress = this._erc721ProxyWrapper.address; - const isProxyApprovedForAll = await this.isApprovedForAllAsync( - tokenAddress, - ownerAddress, - proxyAddress, - methodOpts, - ); - return isProxyApprovedForAll; - } - /** - * Get the approved address for a single NFT. Returns undefined if no approval was set - * Throws if `_tokenId` is not a valid NFT - * @param tokenAddress The hex encoded contract Ethereum address where the ERC721 token is deployed. - * @param tokenId The identifier for an NFT - * @param methodOpts Optional arguments this method accepts. - * @return The approved address for this NFT, or the undefined if there is none - */ - public async getApprovedIfExistsAsync( - tokenAddress: string, - tokenId: BigNumber, - methodOpts: MethodOpts = {}, - ): Promise { - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.isBigNumber('tokenId', tokenId); - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - - const tokenContract = await this._getTokenContractAsync(normalizedTokenAddress); - - const txData = {}; - const approvedAddress = await tokenContract.getApproved.callAsync(tokenId, txData, methodOpts.defaultBlock); - if (approvedAddress === constants.NULL_ADDRESS) { - return undefined; - } - return approvedAddress; - } - /** - * Checks if 0x proxy is approved for a single NFT - * Throws if `_tokenId` is not a valid NFT - * @param tokenAddress The hex encoded contract Ethereum address where the ERC721 token is deployed. - * @param tokenId The identifier for an NFT - * @param methodOpts Optional arguments this method accepts. - * @return True if 0x proxy is approved - */ - public async isProxyApprovedAsync( - tokenAddress: string, - tokenId: BigNumber, - methodOpts: MethodOpts = {}, - ): Promise { - const proxyAddress = this._erc721ProxyWrapper.address; - const approvedAddress = await this.getApprovedIfExistsAsync(tokenAddress, tokenId, methodOpts); - const isProxyApproved = approvedAddress === proxyAddress; - return isProxyApproved; - } - /** - * Enable or disable approval for a third party ("operator") to manage all of `ownerAddress`'s assets. - * Throws if `_tokenId` is not a valid NFT - * Emits the ApprovalForAll event. - * @param tokenAddress The hex encoded contract Ethereum address where the ERC721 token is deployed. - * @param ownerAddress The hex encoded user Ethereum address of the token owner. - * @param operatorAddress The hex encoded user Ethereum address of the operator you'd like to set approval for. - * @param isApproved The boolean variable to set the approval to. - * @param txOpts Transaction parameters. - * @return Transaction hash. - */ - public async setApprovalForAllAsync( - tokenAddress: string, - ownerAddress: string, - operatorAddress: string, - isApproved: boolean, - txOpts: TransactionOpts = {}, - ): Promise { - assert.isETHAddressHex('tokenAddress', tokenAddress); - await assert.isSenderAddressAsync('ownerAddress', ownerAddress, this._web3Wrapper); - assert.isETHAddressHex('operatorAddress', operatorAddress); - assert.isBoolean('isApproved', isApproved); - assert.doesConformToSchema('txOpts', txOpts, txOptsSchema); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - const normalizedOwnerAddress = ownerAddress.toLowerCase(); - const normalizedOperatorAddress = operatorAddress.toLowerCase(); - - const tokenContract = await this._getTokenContractAsync(normalizedTokenAddress); - const txHash = await tokenContract.setApprovalForAll.sendTransactionAsync( - normalizedOperatorAddress, - isApproved, - utils.removeUndefinedProperties({ - gas: txOpts.gasLimit, - gasPrice: txOpts.gasPrice, - from: normalizedOwnerAddress, - nonce: txOpts.nonce, - }), - ); - return txHash; - } - /** - * Enable or disable approval for a third party ("operator") to manage all of `ownerAddress`'s assets. - * Throws if `_tokenId` is not a valid NFT - * Emits the ApprovalForAll event. - * @param tokenAddress The hex encoded contract Ethereum address where the ERC721 token is deployed. - * @param ownerAddress The hex encoded user Ethereum address of the token owner. - * @param operatorAddress The hex encoded user Ethereum address of the operator you'd like to set approval for. - * @param isApproved The boolean variable to set the approval to. - * @param txOpts Transaction parameters. - * @return Transaction hash. - */ - public async setProxyApprovalForAllAsync( - tokenAddress: string, - ownerAddress: string, - isApproved: boolean, - txOpts: TransactionOpts = {}, - ): Promise { - const proxyAddress = this._erc721ProxyWrapper.address; - const txHash = await this.setApprovalForAllAsync(tokenAddress, ownerAddress, proxyAddress, isApproved, txOpts); - return txHash; - } - /** - * Set or reaffirm the approved address for an NFT - * The zero address indicates there is no approved address. Throws unless `msg.sender` is the current NFT owner, - * or an authorized operator of the current owner. - * Throws if `_tokenId` is not a valid NFT - * Emits the Approval event. - * @param tokenAddress The hex encoded contract Ethereum address where the ERC721 token is deployed. - * @param approvedAddress The hex encoded user Ethereum address you'd like to set approval for. - * @param tokenId The identifier for an NFT - * @param txOpts Transaction parameters. - * @return Transaction hash. - */ - public async setApprovalAsync( - tokenAddress: string, - approvedAddress: string, - tokenId: BigNumber, - txOpts: TransactionOpts = {}, - ): Promise { - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.isETHAddressHex('approvedAddress', approvedAddress); - assert.isBigNumber('tokenId', tokenId); - assert.doesConformToSchema('txOpts', txOpts, txOptsSchema); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - const normalizedApprovedAddress = approvedAddress.toLowerCase(); - - const tokenContract = await this._getTokenContractAsync(normalizedTokenAddress); - const tokenOwnerAddress = await tokenContract.ownerOf.callAsync(tokenId); - await assert.isSenderAddressAsync('tokenOwnerAddress', tokenOwnerAddress, this._web3Wrapper); - const txHash = await tokenContract.approve.sendTransactionAsync( - normalizedApprovedAddress, - tokenId, - utils.removeUndefinedProperties({ - gas: txOpts.gasLimit, - gasPrice: txOpts.gasPrice, - from: tokenOwnerAddress, - nonce: txOpts.nonce, - }), - ); - return txHash; - } - /** - * Set or reaffirm 0x proxy as an approved address for an NFT - * Throws unless `msg.sender` is the current NFT owner, or an authorized operator of the current owner. - * Throws if `_tokenId` is not a valid NFT - * Emits the Approval event. - * @param tokenAddress The hex encoded contract Ethereum address where the ERC721 token is deployed. - * @param tokenId The identifier for an NFT - * @param txOpts Transaction parameters. - * @return Transaction hash. - */ - public async setProxyApprovalAsync( - tokenAddress: string, - tokenId: BigNumber, - txOpts: TransactionOpts = {}, - ): Promise { - const proxyAddress = this._erc721ProxyWrapper.address; - const txHash = await this.setApprovalAsync(tokenAddress, proxyAddress, tokenId, txOpts); - return txHash; - } - /** - * Enable or disable approval for a third party ("operator") to manage all of `ownerAddress`'s assets. - * Throws if `_tokenId` is not a valid NFT - * Emits the ApprovalForAll event. - * @param tokenAddress The hex encoded contract Ethereum address where the ERC721 token is deployed. - * @param receiverAddress The hex encoded Ethereum address of the user to send the NFT to. - * @param senderAddress The hex encoded Ethereum address of the user to send the NFT to. - * @param tokenId The identifier for an NFT - * @param txOpts Transaction parameters. - * @return Transaction hash. - */ - public async transferFromAsync( - tokenAddress: string, - receiverAddress: string, - senderAddress: string, - tokenId: BigNumber, - txOpts: TransactionOpts = {}, - ): Promise { - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.isETHAddressHex('receiverAddress', receiverAddress); - await assert.isSenderAddressAsync('senderAddress', senderAddress, this._web3Wrapper); - assert.doesConformToSchema('txOpts', txOpts, txOptsSchema); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - const normalizedReceiverAddress = receiverAddress.toLowerCase(); - const normalizedSenderAddress = senderAddress.toLowerCase(); - const tokenContract = await this._getTokenContractAsync(normalizedTokenAddress); - const ownerAddress = await this.getOwnerOfAsync(tokenAddress, tokenId); - 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( - ownerAddress, - normalizedReceiverAddress, - tokenId, - utils.removeUndefinedProperties({ - gas: txOpts.gasLimit, - gasPrice: txOpts.gasPrice, - from: normalizedSenderAddress, - nonce: txOpts.nonce, - }), - ); - return txHash; - } - /** - * Subscribe to an event type emitted by the Token contract. - * @param tokenAddress The hex encoded address where the ERC721 token is deployed. - * @param eventName The token contract event you would like to subscribe to. - * @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( - tokenAddress: string, - eventName: ERC721TokenEvents, - indexFilterValues: IndexedFilterValues, - callback: EventCallback, - isVerbose: boolean = false, - ): string { - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.doesBelongToStringEnum('eventName', eventName, ERC721TokenEvents); - assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema); - assert.isFunction('callback', callback); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - const subscriptionToken = this._subscribe( - normalizedTokenAddress, - eventName, - indexFilterValues, - ERC721Token.compilerOutput.abi, - callback, - isVerbose, - ); - return subscriptionToken; - } - /** - * Cancel a subscription - * @param subscriptionToken Subscription token returned by `subscribe()` - */ - public unsubscribe(subscriptionToken: string): void { - assert.isValidSubscriptionToken('subscriptionToken', subscriptionToken); - this._unsubscribe(subscriptionToken); - } - /** - * Cancels all existing subscriptions - */ - public unsubscribeAll(): void { - super._unsubscribeAll(); - } - /** - * Gets historical logs without creating a subscription - * @param tokenAddress An address of the token that emitted the logs. - * @param eventName The token contract event you would like to subscribe to. - * @param blockRange Block range to get logs from. - * @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 `{_from: aUserAddressHex}` - * @return Array of logs that match the parameters - */ - public async getLogsAsync( - tokenAddress: string, - eventName: ERC721TokenEvents, - blockRange: BlockRange, - indexFilterValues: IndexedFilterValues, - ): Promise>> { - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.doesBelongToStringEnum('eventName', eventName, ERC721TokenEvents); - assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema); - assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema); - const normalizedTokenAddress = tokenAddress.toLowerCase(); - const logs = await this._getLogsAsync( - normalizedTokenAddress, - eventName, - blockRange, - indexFilterValues, - ERC721Token.compilerOutput.abi, - ); - return logs; - } - private async _getTokenContractAsync(tokenAddress: string): Promise { - const normalizedTokenAddress = tokenAddress.toLowerCase(); - let tokenContract = this._tokenContractsByAddress[normalizedTokenAddress]; - if (!_.isUndefined(tokenContract)) { - return tokenContract; - } - const contractInstance = new ERC721TokenContract( - this.abi, - normalizedTokenAddress, - this._web3Wrapper.getProvider(), - this._web3Wrapper.getContractDefaults(), - ); - tokenContract = contractInstance; - this._tokenContractsByAddress[normalizedTokenAddress] = tokenContract; - return tokenContract; - } -} diff --git a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts deleted file mode 100644 index 6093f0f95..000000000 --- a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts +++ /dev/null @@ -1,211 +0,0 @@ -import { WETH9Contract, WETH9EventArgs, WETH9Events } from '@0x/abi-gen-wrappers'; -import { WETH9 } from '@0x/contract-artifacts'; -import { schemas } from '@0x/json-schemas'; -import { BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import { ContractAbi, LogWithDecodedArgs } from 'ethereum-types'; -import * as _ from 'lodash'; - -import { BlockRange, ContractWrappersError, EventCallback, IndexedFilterValues, TransactionOpts } from '../types'; -import { assert } from '../utils/assert'; -import { utils } from '../utils/utils'; - -import { ContractWrapper } from './contract_wrapper'; -import { ERC20TokenWrapper } from './erc20_token_wrapper'; - -/** - * This class includes all the functionality related to interacting with a wrapped Ether ERC20 token contract. - * The caller can convert ETH into the equivalent number of wrapped ETH ERC20 tokens and back. - */ -export class EtherTokenWrapper extends ContractWrapper { - public abi: ContractAbi = WETH9.compilerOutput.abi; - private readonly _etherTokenContractsByAddress: { - [address: string]: WETH9Contract; - } = {}; - private readonly _erc20TokenWrapper: ERC20TokenWrapper; - /** - * Instantiate EtherTokenWrapper. - * @param web3Wrapper Web3Wrapper instance to use - * @param networkId Desired networkId - * @param erc20TokenWrapper The ERC20TokenWrapper instance to use - * @param blockPollingIntervalMs The block polling interval to use for active subscriptions - */ - constructor( - web3Wrapper: Web3Wrapper, - networkId: number, - erc20TokenWrapper: ERC20TokenWrapper, - blockPollingIntervalMs?: number, - ) { - super(web3Wrapper, networkId, blockPollingIntervalMs); - this._erc20TokenWrapper = erc20TokenWrapper; - } - /** - * Deposit ETH into the Wrapped ETH smart contract and issues the equivalent number of wrapped ETH tokens - * to the depositor address. These wrapped ETH tokens can be used in 0x trades and are redeemable for 1-to-1 - * for ETH. - * @param etherTokenAddress EtherToken address you wish to deposit into. - * @param amountInWei Amount of ETH in Wei the caller wishes to deposit. - * @param depositor The hex encoded user Ethereum address that would like to make the deposit. - * @param txOpts Transaction parameters. - * @return Transaction hash. - */ - public async depositAsync( - etherTokenAddress: string, - amountInWei: BigNumber, - depositor: string, - txOpts: TransactionOpts = {}, - ): Promise { - assert.isETHAddressHex('etherTokenAddress', etherTokenAddress); - assert.isValidBaseUnitAmount('amountInWei', amountInWei); - await assert.isSenderAddressAsync('depositor', depositor, this._web3Wrapper); - const normalizedEtherTokenAddress = etherTokenAddress.toLowerCase(); - const normalizedDepositorAddress = depositor.toLowerCase(); - - const ethBalanceInWei = await this._web3Wrapper.getBalanceInWeiAsync(normalizedDepositorAddress); - assert.assert(ethBalanceInWei.gte(amountInWei), ContractWrappersError.InsufficientEthBalanceForDeposit); - - const wethContract = await this._getEtherTokenContractAsync(normalizedEtherTokenAddress); - const txHash = await wethContract.deposit.sendTransactionAsync( - utils.removeUndefinedProperties({ - from: normalizedDepositorAddress, - value: amountInWei, - gas: txOpts.gasLimit, - gasPrice: txOpts.gasPrice, - nonce: txOpts.nonce, - }), - ); - return txHash; - } - /** - * Withdraw ETH to the withdrawer's address from the wrapped ETH smart contract in exchange for the - * equivalent number of wrapped ETH tokens. - * @param etherTokenAddress EtherToken address you wish to withdraw from. - * @param amountInWei Amount of ETH in Wei the caller wishes to withdraw. - * @param withdrawer The hex encoded user Ethereum address that would like to make the withdrawal. - * @param txOpts Transaction parameters. - * @return Transaction hash. - */ - public async withdrawAsync( - etherTokenAddress: string, - amountInWei: BigNumber, - withdrawer: string, - txOpts: TransactionOpts = {}, - ): Promise { - assert.isValidBaseUnitAmount('amountInWei', amountInWei); - assert.isETHAddressHex('etherTokenAddress', etherTokenAddress); - await assert.isSenderAddressAsync('withdrawer', withdrawer, this._web3Wrapper); - const normalizedEtherTokenAddress = etherTokenAddress.toLowerCase(); - const normalizedWithdrawerAddress = withdrawer.toLowerCase(); - - const WETHBalanceInBaseUnits = await this._erc20TokenWrapper.getBalanceAsync( - normalizedEtherTokenAddress, - normalizedWithdrawerAddress, - ); - assert.assert( - WETHBalanceInBaseUnits.gte(amountInWei), - ContractWrappersError.InsufficientWEthBalanceForWithdrawal, - ); - - const wethContract = await this._getEtherTokenContractAsync(normalizedEtherTokenAddress); - const txHash = await wethContract.withdraw.sendTransactionAsync( - amountInWei, - utils.removeUndefinedProperties({ - from: normalizedWithdrawerAddress, - gas: txOpts.gasLimit, - gasPrice: txOpts.gasPrice, - nonce: txOpts.nonce, - }), - ); - return txHash; - } - /** - * Gets historical logs without creating a subscription - * @param etherTokenAddress An address of the ether token that emitted the logs. - * @param eventName The ether token contract event you would like to subscribe to. - * @param blockRange Block range to get logs from. - * @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}` - * @return Array of logs that match the parameters - */ - public async getLogsAsync( - etherTokenAddress: string, - eventName: WETH9Events, - blockRange: BlockRange, - indexFilterValues: IndexedFilterValues, - ): Promise>> { - assert.isETHAddressHex('etherTokenAddress', etherTokenAddress); - const normalizedEtherTokenAddress = etherTokenAddress.toLowerCase(); - assert.doesBelongToStringEnum('eventName', eventName, WETH9Events); - assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema); - assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema); - const logs = await this._getLogsAsync( - normalizedEtherTokenAddress, - eventName, - blockRange, - indexFilterValues, - WETH9.compilerOutput.abi, - ); - return logs; - } - /** - * Subscribe to an event type emitted by the Token contract. - * @param etherTokenAddress The hex encoded address where the ether token is deployed. - * @param eventName The ether token contract event you would like to subscribe to. - * @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( - etherTokenAddress: string, - eventName: WETH9Events, - indexFilterValues: IndexedFilterValues, - callback: EventCallback, - isVerbose: boolean = false, - ): string { - assert.isETHAddressHex('etherTokenAddress', etherTokenAddress); - const normalizedEtherTokenAddress = etherTokenAddress.toLowerCase(); - assert.doesBelongToStringEnum('eventName', eventName, WETH9Events); - assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema); - assert.isFunction('callback', callback); - const subscriptionToken = this._subscribe( - normalizedEtherTokenAddress, - eventName, - indexFilterValues, - WETH9.compilerOutput.abi, - callback, - isVerbose, - ); - return subscriptionToken; - } - /** - * Cancel a subscription - * @param subscriptionToken Subscription token returned by `subscribe()` - */ - public unsubscribe(subscriptionToken: string): void { - assert.isValidSubscriptionToken('subscriptionToken', subscriptionToken); - this._unsubscribe(subscriptionToken); - } - /** - * Cancels all existing subscriptions - */ - public unsubscribeAll(): void { - super._unsubscribeAll(); - } - private async _getEtherTokenContractAsync(etherTokenAddress: string): Promise { - let etherTokenContract = this._etherTokenContractsByAddress[etherTokenAddress]; - if (!_.isUndefined(etherTokenContract)) { - return etherTokenContract; - } - const contractInstance = new WETH9Contract( - this.abi, - etherTokenAddress, - this._web3Wrapper.getProvider(), - this._web3Wrapper.getContractDefaults(), - ); - etherTokenContract = contractInstance; - this._etherTokenContractsByAddress[etherTokenAddress] = etherTokenContract; - return etherTokenContract; - } -} diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts deleted file mode 100644 index 49193f816..000000000 --- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts +++ /dev/null @@ -1,1231 +0,0 @@ -import { ExchangeContract, ExchangeEventArgs, ExchangeEvents } from '@0x/abi-gen-wrappers'; -import { Exchange } from '@0x/contract-artifacts'; -import { schemas } from '@0x/json-schemas'; -import { - assetDataUtils, - BalanceAndProxyAllowanceLazyStore, - ExchangeTransferSimulator, - OrderValidationUtils, -} from '@0x/order-utils'; -import { AssetProxyId, Order, SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import { BlockParamLiteral, ContractAbi, LogWithDecodedArgs } from 'ethereum-types'; -import * as _ from 'lodash'; - -import { AssetBalanceAndProxyAllowanceFetcher } from '../fetchers/asset_balance_and_proxy_allowance_fetcher'; -import { OrderFilledCancelledFetcher } from '../fetchers/order_filled_cancelled_fetcher'; -import { methodOptsSchema } from '../schemas/method_opts_schema'; -import { orderTxOptsSchema } from '../schemas/order_tx_opts_schema'; -import { txOptsSchema } from '../schemas/tx_opts_schema'; -import { validateOrderFillableOptsSchema } from '../schemas/validate_order_fillable_opts_schema'; -import { - BlockRange, - EventCallback, - ExchangeWrapperError, - IndexedFilterValues, - MethodOpts, - OrderInfo, - OrderTransactionOpts, - ValidateOrderFillableOpts, -} from '../types'; -import { assert } from '../utils/assert'; -import { _getDefaultContractAddresses } from '../utils/contract_addresses'; -import { decorators } from '../utils/decorators'; -import { TransactionEncoder } from '../utils/transaction_encoder'; - -import { ContractWrapper } from './contract_wrapper'; -import { ERC20TokenWrapper } from './erc20_token_wrapper'; -import { ERC721TokenWrapper } from './erc721_token_wrapper'; - -/** - * This class includes all the functionality related to calling methods, sending transactions and subscribing to - * events of the 0x V2 Exchange smart contract. - */ -export class ExchangeWrapper extends ContractWrapper { - public abi: ContractAbi = Exchange.compilerOutput.abi; - public address: string; - public zrxTokenAddress: string; - private _exchangeContractIfExists?: ExchangeContract; - private readonly _erc721TokenWrapper: ERC721TokenWrapper; - private readonly _erc20TokenWrapper: ERC20TokenWrapper; - /** - * Instantiate ExchangeWrapper - * @param web3Wrapper Web3Wrapper instance to use. - * @param networkId Desired networkId. - * @param erc20TokenWrapper ERC20TokenWrapper instance to use. - * @param erc721TokenWrapper ERC721TokenWrapper instance to use. - * @param address The address of the Exchange contract. If undefined, will - * default to the known address corresponding to the networkId. - * @param zrxTokenAddress The address of the ZRXToken contract. If - * undefined, will default to the known address corresponding to the - * networkId. - * @param blockPollingIntervalMs The block polling interval to use for active subscriptions. - */ - constructor( - web3Wrapper: Web3Wrapper, - networkId: number, - erc20TokenWrapper: ERC20TokenWrapper, - erc721TokenWrapper: ERC721TokenWrapper, - address?: string, - zrxTokenAddress?: string, - blockPollingIntervalMs?: number, - ) { - super(web3Wrapper, networkId, blockPollingIntervalMs); - this._erc20TokenWrapper = erc20TokenWrapper; - this._erc721TokenWrapper = erc721TokenWrapper; - this.address = _.isUndefined(address) ? _getDefaultContractAddresses(networkId).exchange : address; - this.zrxTokenAddress = _.isUndefined(zrxTokenAddress) - ? _getDefaultContractAddresses(networkId).zrxToken - : zrxTokenAddress; - } - /** - * Retrieve the address of an asset proxy by signature. - * @param proxyId The 4 bytes signature of an asset proxy - * @param methodOpts Optional arguments this method accepts. - * @return The address of an asset proxy for a given signature - */ - public async getAssetProxyBySignatureAsync(proxyId: AssetProxyId, methodOpts: MethodOpts = {}): Promise { - assert.doesBelongToStringEnum('proxyId', proxyId, AssetProxyId); - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - const exchangeContract = await this._getExchangeContractAsync(); - - const txData = {}; - const assetProxy = await exchangeContract.getAssetProxy.callAsync(proxyId, txData, methodOpts.defaultBlock); - return assetProxy; - } - /** - * Retrieve the takerAssetAmount of an order that has already been filled. - * @param orderHash The hex encoded orderHash for which you would like to retrieve the filled takerAssetAmount. - * @param methodOpts Optional arguments this method accepts. - * @return The amount of the order (in taker asset base units) that has already been filled. - */ - public async getFilledTakerAssetAmountAsync(orderHash: string, methodOpts: MethodOpts = {}): Promise { - assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema); - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - const exchangeContract = await this._getExchangeContractAsync(); - - const txData = {}; - const filledTakerAssetAmountInBaseUnits = await exchangeContract.filled.callAsync( - orderHash, - txData, - methodOpts.defaultBlock, - ); - return filledTakerAssetAmountInBaseUnits; - } - /** - * Retrieve the exchange contract version - * @param methodOpts Optional arguments this method accepts. - * @return Version - */ - public async getVersionAsync(methodOpts: MethodOpts = {}): Promise { - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - const exchangeContract = await this._getExchangeContractAsync(); - - const txData = {}; - const version = await exchangeContract.VERSION.callAsync(txData, methodOpts.defaultBlock); - return version; - } - /** - * Retrieve the set order epoch for a given makerAddress & senderAddress pair. - * Orders can be bulk cancelled by setting the order epoch to a value lower then the salt value of orders one wishes to cancel. - * @param makerAddress Maker address - * @param senderAddress Sender address - * @param methodOpts Optional arguments this method accepts. - * @return Order epoch. Defaults to 0. - */ - public async getOrderEpochAsync( - makerAddress: string, - senderAddress: string, - methodOpts: MethodOpts = {}, - ): Promise { - assert.isETHAddressHex('makerAddress', makerAddress); - assert.isETHAddressHex('senderAddress', senderAddress); - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - const exchangeContract = await this._getExchangeContractAsync(); - - const txData = {}; - const orderEpoch = await exchangeContract.orderEpoch.callAsync( - makerAddress, - senderAddress, - txData, - methodOpts.defaultBlock, - ); - return orderEpoch; - } - /** - * Check if an order has been cancelled. Order cancellations are binary - * @param orderHash The hex encoded orderHash for which you would like to retrieve the cancelled takerAmount. - * @param methodOpts Optional arguments this method accepts. - * @return Whether the order has been cancelled. - */ - public async isCancelledAsync(orderHash: string, methodOpts: MethodOpts = {}): Promise { - assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema); - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - const exchangeContract = await this._getExchangeContractAsync(); - - const txData = {}; - const isCancelled = await exchangeContract.cancelled.callAsync(orderHash, txData, methodOpts.defaultBlock); - return isCancelled; - } - /** - * Fills a signed order with an amount denominated in baseUnits of the taker asset. - * @param signedOrder An object that conforms to the SignedOrder interface. - * @param takerAssetFillAmount The amount of the order (in taker asset baseUnits) that you wish to fill. - * @param takerAddress The user Ethereum address who would like to fill this order. Must be available via the supplied - * Provider provided at instantiation. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async fillOrderAsync( - signedOrder: SignedOrder, - takerAssetFillAmount: BigNumber, - takerAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema); - assert.isValidBaseUnitAmount('takerAssetFillAmount', takerAssetFillAmount); - await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedTakerAddress = takerAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.fillOrder.callAsync(signedOrder, takerAssetFillAmount, signedOrder.signature, { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - - const txHash = await exchangeInstance.fillOrder.sendTransactionAsync( - signedOrder, - takerAssetFillAmount, - signedOrder.signature, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * No-throw version of fillOrderAsync. This version will not throw if the fill fails. This allows the caller to save gas at the expense of not knowing the reason the fill failed. - * @param signedOrder An object that conforms to the SignedOrder interface. - * @param takerAssetFillAmount The amount of the order (in taker asset baseUnits) that you wish to fill. - * @param takerAddress The user Ethereum address who would like to fill this order. - * Must be available via the supplied Provider provided at instantiation. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async fillOrderNoThrowAsync( - signedOrder: SignedOrder, - takerAssetFillAmount: BigNumber, - takerAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema); - assert.isValidBaseUnitAmount('takerAssetFillAmount', takerAssetFillAmount); - await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedTakerAddress = takerAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.fillOrderNoThrow.callAsync( - signedOrder, - takerAssetFillAmount, - signedOrder.signature, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - } - const txHash = await exchangeInstance.fillOrderNoThrow.sendTransactionAsync( - signedOrder, - takerAssetFillAmount, - signedOrder.signature, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * Attempts to fill a specific amount of an order. If the entire amount specified cannot be filled, - * the fill order is abandoned. - * @param signedOrder An object that conforms to the SignedOrder interface. - * @param takerAssetFillAmount The amount of the order (in taker asset baseUnits) that you wish to fill. - * @param takerAddress The user Ethereum address who would like to fill this order. Must be available via the supplied - * Provider provided at instantiation. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async fillOrKillOrderAsync( - signedOrder: SignedOrder, - takerAssetFillAmount: BigNumber, - takerAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema); - assert.isValidBaseUnitAmount('takerAssetFillAmount', takerAssetFillAmount); - await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedTakerAddress = takerAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.fillOrKillOrder.callAsync(signedOrder, takerAssetFillAmount, signedOrder.signature, { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - const txHash = await exchangeInstance.fillOrKillOrder.sendTransactionAsync( - signedOrder, - takerAssetFillAmount, - signedOrder.signature, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * Executes a 0x transaction. Transaction messages exist for the purpose of calling methods on the Exchange contract - * in the context of another address (see [ZEIP18](https://github.com/0xProject/ZEIPs/issues/18)). - * This is especially useful for implementing filter contracts. - * @param salt Salt - * @param signerAddress Signer address - * @param data Transaction data - * @param signature Signature - * @param senderAddress Sender address - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async executeTransactionAsync( - salt: BigNumber, - signerAddress: string, - data: string, - signature: string, - senderAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.isBigNumber('salt', salt); - assert.isETHAddressHex('signerAddress', signerAddress); - assert.isHexString('data', data); - assert.isHexString('signature', signature); - await assert.isSenderAddressAsync('senderAddress', senderAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedSenderAddress = senderAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.executeTransaction.callAsync(salt, signerAddress, data, signature, { - from: normalizedSenderAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - const txHash = await exchangeInstance.executeTransaction.sendTransactionAsync( - salt, - signerAddress, - data, - signature, - { - from: normalizedSenderAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * Batch version of fillOrderAsync. Executes multiple fills atomically in a single transaction. - * @param signedOrders An array of signed orders to fill. - * @param takerAssetFillAmounts The amounts of the orders (in taker asset baseUnits) that you wish to fill. - * @param takerAddress The user Ethereum address who would like to fill these orders. Must be available via the supplied - * Provider provided at instantiation. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async batchFillOrdersAsync( - signedOrders: SignedOrder[], - takerAssetFillAmounts: BigNumber[], - takerAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - _.forEach(takerAssetFillAmounts, takerAssetFillAmount => - assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount), - ); - await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedTakerAddress = takerAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - const signatures = _.map(signedOrders, signedOrder => signedOrder.signature); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.batchFillOrders.callAsync(signedOrders, takerAssetFillAmounts, signatures, { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - const txHash = await exchangeInstance.batchFillOrders.sendTransactionAsync( - signedOrders, - takerAssetFillAmounts, - signatures, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * Synchronously executes multiple calls to fillOrder until total amount of makerAsset is bought by taker. - * @param signedOrders An array of signed orders to fill. - * @param makerAssetFillAmount Maker asset fill amount. - * @param takerAddress The user Ethereum address who would like to fill these orders. Must be available via the supplied - * Provider provided at instantiation. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async marketBuyOrdersAsync( - signedOrders: SignedOrder[], - makerAssetFillAmount: BigNumber, - takerAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); - await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedTakerAddress = takerAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - const signatures = _.map(signedOrders, signedOrder => signedOrder.signature); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.marketBuyOrders.callAsync(signedOrders, makerAssetFillAmount, signatures, { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - const txHash = await exchangeInstance.marketBuyOrders.sendTransactionAsync( - signedOrders, - makerAssetFillAmount, - signatures, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * Synchronously executes multiple calls to fillOrder until total amount of makerAsset is bought by taker. - * @param signedOrders An array of signed orders to fill. - * @param takerAssetFillAmount Taker asset fill amount. - * @param takerAddress The user Ethereum address who would like to fill these orders. Must be available via the supplied - * Provider provided at instantiation. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async marketSellOrdersAsync( - signedOrders: SignedOrder[], - takerAssetFillAmount: BigNumber, - takerAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); - await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedTakerAddress = takerAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - const signatures = _.map(signedOrders, signedOrder => signedOrder.signature); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.marketSellOrders.callAsync(signedOrders, takerAssetFillAmount, signatures, { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - const txHash = await exchangeInstance.marketSellOrders.sendTransactionAsync( - signedOrders, - takerAssetFillAmount, - signatures, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * No throw version of marketBuyOrdersAsync - * @param signedOrders An array of signed orders to fill. - * @param makerAssetFillAmount Maker asset fill amount. - * @param takerAddress The user Ethereum address who would like to fill these orders. Must be available via the supplied - * Provider provided at instantiation. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async marketBuyOrdersNoThrowAsync( - signedOrders: SignedOrder[], - makerAssetFillAmount: BigNumber, - takerAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); - await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedTakerAddress = takerAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - const signatures = _.map(signedOrders, signedOrder => signedOrder.signature); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.marketBuyOrdersNoThrow.callAsync(signedOrders, makerAssetFillAmount, signatures, { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - const txHash = await exchangeInstance.marketBuyOrdersNoThrow.sendTransactionAsync( - signedOrders, - makerAssetFillAmount, - signatures, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * No throw version of marketSellOrdersAsync - * @param signedOrders An array of signed orders to fill. - * @param takerAssetFillAmount Taker asset fill amount. - * @param takerAddress The user Ethereum address who would like to fill these orders. Must be available via the supplied - * Provider provided at instantiation. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async marketSellOrdersNoThrowAsync( - signedOrders: SignedOrder[], - takerAssetFillAmount: BigNumber, - takerAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); - await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedTakerAddress = takerAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - const signatures = _.map(signedOrders, signedOrder => signedOrder.signature); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.marketSellOrdersNoThrow.callAsync(signedOrders, takerAssetFillAmount, signatures, { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - const txHash = await exchangeInstance.marketSellOrdersNoThrow.sendTransactionAsync( - signedOrders, - takerAssetFillAmount, - signatures, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * No throw version of batchFillOrdersAsync - * @param signedOrders An array of signed orders to fill. - * @param takerAssetFillAmounts The amounts of the orders (in taker asset baseUnits) that you wish to fill. - * @param takerAddress The user Ethereum address who would like to fill these orders. Must be available via the supplied - * Provider provided at instantiation. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async batchFillOrdersNoThrowAsync( - signedOrders: SignedOrder[], - takerAssetFillAmounts: BigNumber[], - takerAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - _.forEach(takerAssetFillAmounts, takerAssetFillAmount => - assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount), - ); - await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedTakerAddress = takerAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - const signatures = _.map(signedOrders, signedOrder => signedOrder.signature); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.batchFillOrdersNoThrow.callAsync(signedOrders, takerAssetFillAmounts, signatures, { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - const txHash = await exchangeInstance.batchFillOrdersNoThrow.sendTransactionAsync( - signedOrders, - takerAssetFillAmounts, - signatures, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * Batch version of fillOrKillOrderAsync. Executes multiple fills atomically in a single transaction. - * @param signedOrders An array of signed orders to fill. - * @param takerAssetFillAmounts The amounts of the orders (in taker asset baseUnits) that you wish to fill. - * @param takerAddress The user Ethereum address who would like to fill these orders. Must be available via the supplied - * Provider provided at instantiation. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async batchFillOrKillOrdersAsync( - signedOrders: SignedOrder[], - takerAssetFillAmounts: BigNumber[], - takerAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - _.forEach(takerAssetFillAmounts, takerAssetFillAmount => - assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount), - ); - await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedTakerAddress = takerAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - const signatures = _.map(signedOrders, signedOrder => signedOrder.signature); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.batchFillOrKillOrders.callAsync(signedOrders, takerAssetFillAmounts, signatures, { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - const txHash = await exchangeInstance.batchFillOrKillOrders.sendTransactionAsync( - signedOrders, - takerAssetFillAmounts, - signatures, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * Batch version of cancelOrderAsync. Executes multiple cancels atomically in a single transaction. - * @param orders An array of orders to cancel. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async batchCancelOrdersAsync( - orders: Array, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.doesConformToSchema('orders', orders, schemas.ordersSchema); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const makerAddresses = _.map(orders, order => order.makerAddress); - const makerAddress = makerAddresses[0]; - await assert.isSenderAddressAsync('makerAddress', makerAddress, this._web3Wrapper); - const normalizedMakerAddress = makerAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.batchCancelOrders.callAsync(orders, { - from: normalizedMakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - const txHash = await exchangeInstance.batchCancelOrders.sendTransactionAsync(orders, { - from: normalizedMakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - return txHash; - } - /** - * Match two complementary orders that have a profitable spread. - * Each order is filled at their respective price point. However, the calculations are carried out as though - * the orders are both being filled at the right order's price point. - * The profit made by the left order goes to the taker (whoever matched the two orders). - * @param leftSignedOrder First order to match. - * @param rightSignedOrder Second order to match. - * @param takerAddress The address that sends the transaction and gets the spread. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async matchOrdersAsync( - leftSignedOrder: SignedOrder, - rightSignedOrder: SignedOrder, - takerAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.doesConformToSchema('leftSignedOrder', leftSignedOrder, schemas.signedOrderSchema); - assert.doesConformToSchema('rightSignedOrder', rightSignedOrder, schemas.signedOrderSchema); - await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedTakerAddress = takerAddress.toLowerCase(); - if ( - rightSignedOrder.makerAssetData !== leftSignedOrder.takerAssetData || - rightSignedOrder.takerAssetData !== leftSignedOrder.makerAssetData - ) { - throw new Error(ExchangeWrapperError.AssetDataMismatch); - } - const exchangeInstance = await this._getExchangeContractAsync(); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.matchOrders.callAsync( - leftSignedOrder, - rightSignedOrder, - leftSignedOrder.signature, - rightSignedOrder.signature, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - } - const txHash = await exchangeInstance.matchOrders.sendTransactionAsync( - leftSignedOrder, - rightSignedOrder, - leftSignedOrder.signature, - rightSignedOrder.signature, - { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * Approves a hash on-chain using any valid signature type. - * After presigning a hash, the preSign signature type will become valid for that hash and signer. - * @param hash Hash to pre-sign - * @param signerAddress Address that should have signed the given hash. - * @param signature Proof that the hash has been signed by signer. - * @param senderAddress Address that should send the transaction. - * @param orderTransactionOpts Optional arguments this method accepts. - * @returns Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async preSignAsync( - hash: string, - signerAddress: string, - signature: string, - senderAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.isHexString('hash', hash); - assert.isETHAddressHex('signerAddress', signerAddress); - assert.isHexString('signature', signature); - await assert.isSenderAddressAsync('senderAddress', senderAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedTakerAddress = senderAddress.toLowerCase(); - const exchangeInstance = await this._getExchangeContractAsync(); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.preSign.callAsync(hash, signerAddress, signature, { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - const txHash = await exchangeInstance.preSign.sendTransactionAsync(hash, signerAddress, signature, { - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - return txHash; - } - /** - * Checks if the signature is valid. - * @param hash Hash to pre-sign - * @param signerAddress Address that should have signed the given hash. - * @param signature Proof that the hash has been signed by signer. - * @param methodOpts Optional arguments this method accepts. - * @returns If the signature is valid - */ - @decorators.asyncZeroExErrorHandler - public async isValidSignatureAsync( - hash: string, - signerAddress: string, - signature: string, - methodOpts: MethodOpts = {}, - ): Promise { - assert.isHexString('hash', hash); - assert.isETHAddressHex('signerAddress', signerAddress); - assert.isHexString('signature', signature); - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - const exchangeInstance = await this._getExchangeContractAsync(); - const txData = {}; - const isValidSignature = await exchangeInstance.isValidSignature.callAsync( - hash, - signerAddress, - signature, - txData, - methodOpts.defaultBlock, - ); - return isValidSignature; - } - /** - * Checks if the validator is allowed by the signer. - * @param validatorAddress Address of a validator - * @param signerAddress Address of a signer - * @param methodOpts Optional arguments this method accepts. - * @returns If the validator is allowed - */ - @decorators.asyncZeroExErrorHandler - public async isAllowedValidatorAsync( - signerAddress: string, - validatorAddress: string, - methodOpts: MethodOpts = {}, - ): Promise { - assert.isETHAddressHex('signerAddress', signerAddress); - assert.isETHAddressHex('validatorAddress', validatorAddress); - if (!_.isUndefined(methodOpts)) { - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - } - const normalizedSignerAddress = signerAddress.toLowerCase(); - const normalizedValidatorAddress = validatorAddress.toLowerCase(); - const exchangeInstance = await this._getExchangeContractAsync(); - const txData = {}; - const isValidSignature = await exchangeInstance.allowedValidators.callAsync( - normalizedSignerAddress, - normalizedValidatorAddress, - txData, - methodOpts.defaultBlock, - ); - return isValidSignature; - } - /** - * Check whether the hash is pre-signed on-chain. - * @param hash Hash to check if pre-signed - * @param signerAddress Address that should have signed the given hash. - * @param methodOpts Optional arguments this method accepts. - * @returns Whether the hash is pre-signed. - */ - @decorators.asyncZeroExErrorHandler - public async isPreSignedAsync(hash: string, signerAddress: string, methodOpts: MethodOpts = {}): Promise { - assert.isHexString('hash', hash); - assert.isETHAddressHex('signerAddress', signerAddress); - if (!_.isUndefined(methodOpts)) { - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - } - const exchangeInstance = await this._getExchangeContractAsync(); - - const txData = {}; - const isPreSigned = await exchangeInstance.preSigned.callAsync( - hash, - signerAddress, - txData, - methodOpts.defaultBlock, - ); - return isPreSigned; - } - /** - * Checks if transaction is already executed. - * @param transactionHash Transaction hash to check - * @param signerAddress Address that should have signed the given hash. - * @param methodOpts Optional arguments this method accepts. - * @returns If transaction is already executed. - */ - @decorators.asyncZeroExErrorHandler - public async isTransactionExecutedAsync(transactionHash: string, methodOpts: MethodOpts = {}): Promise { - assert.isHexString('transactionHash', transactionHash); - if (!_.isUndefined(methodOpts)) { - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - } - const exchangeInstance = await this._getExchangeContractAsync(); - const txData = {}; - const isExecuted = await exchangeInstance.transactions.callAsync( - transactionHash, - txData, - methodOpts.defaultBlock, - ); - return isExecuted; - } - /** - * Get order info - * @param order Order - * @param methodOpts Optional arguments this method accepts. - * @returns Order info - */ - @decorators.asyncZeroExErrorHandler - public async getOrderInfoAsync(order: Order | SignedOrder, methodOpts: MethodOpts = {}): Promise { - assert.doesConformToSchema('order', order, schemas.orderSchema); - if (!_.isUndefined(methodOpts)) { - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - } - const exchangeInstance = await this._getExchangeContractAsync(); - const txData = {}; - const orderInfo = await exchangeInstance.getOrderInfo.callAsync(order, txData, methodOpts.defaultBlock); - return orderInfo; - } - /** - * Get order info for multiple orders - * @param orders Orders - * @param methodOpts Optional arguments this method accepts. - * @returns Array of Order infos - */ - @decorators.asyncZeroExErrorHandler - public async getOrdersInfoAsync( - orders: Array, - methodOpts: MethodOpts = {}, - ): Promise { - assert.doesConformToSchema('orders', orders, schemas.ordersSchema); - if (!_.isUndefined(methodOpts)) { - assert.doesConformToSchema('methodOpts', methodOpts, methodOptsSchema); - } - const exchangeInstance = await this._getExchangeContractAsync(); - const txData = {}; - const ordersInfo = await exchangeInstance.getOrdersInfo.callAsync(orders, txData, methodOpts.defaultBlock); - return ordersInfo; - } - /** - * Cancel a given order. - * @param order An object that conforms to the Order or SignedOrder interface. The order you would like to cancel. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async cancelOrderAsync( - order: Order | SignedOrder, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.doesConformToSchema('order', order, schemas.orderSchema); - await assert.isSenderAddressAsync('order.maker', order.makerAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedMakerAddress = order.makerAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.cancelOrder.callAsync(order, { - from: normalizedMakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - const txHash = await exchangeInstance.cancelOrder.sendTransactionAsync(order, { - from: normalizedMakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - return txHash; - } - /** - * Sets the signature validator approval - * @param validatorAddress Validator contract address. - * @param isApproved Boolean value to set approval to. - * @param senderAddress Sender address. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async setSignatureValidatorApprovalAsync( - validatorAddress: string, - isApproved: boolean, - senderAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.isETHAddressHex('validatorAddress', validatorAddress); - assert.isBoolean('isApproved', isApproved); - await assert.isSenderAddressAsync('senderAddress', senderAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedSenderAddress = senderAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.setSignatureValidatorApproval.callAsync(validatorAddress, isApproved, { - from: normalizedSenderAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - const txHash = await exchangeInstance.setSignatureValidatorApproval.sendTransactionAsync( - validatorAddress, - isApproved, - { - from: normalizedSenderAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * Cancels all orders created by makerAddress with a salt less than or equal to the targetOrderEpoch - * and senderAddress equal to msg.sender (or null address if msg.sender == makerAddress). - * @param targetOrderEpoch Target order epoch. - * @param senderAddress Address that should send the transaction. - * @param orderTransactionOpts Optional arguments this method accepts. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async cancelOrdersUpToAsync( - targetOrderEpoch: BigNumber, - senderAddress: string, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - assert.isBigNumber('targetOrderEpoch', targetOrderEpoch); - await assert.isSenderAddressAsync('senderAddress', senderAddress, this._web3Wrapper); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - const normalizedSenderAddress = senderAddress.toLowerCase(); - - const exchangeInstance = await this._getExchangeContractAsync(); - if (orderTransactionOpts.shouldValidate) { - await exchangeInstance.cancelOrdersUpTo.callAsync(targetOrderEpoch, { - from: normalizedSenderAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - } - const txHash = await exchangeInstance.cancelOrdersUpTo.sendTransactionAsync(targetOrderEpoch, { - from: normalizedSenderAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }); - return txHash; - } - /** - * Subscribe to an event type emitted by the Exchange contract. - * @param eventName The exchange contract event you would like to subscribe to. - * @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( - eventName: ExchangeEvents, - indexFilterValues: IndexedFilterValues, - callback: EventCallback, - isVerbose: boolean = false, - ): string { - assert.doesBelongToStringEnum('eventName', eventName, ExchangeEvents); - assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema); - assert.isFunction('callback', callback); - const subscriptionToken = this._subscribe( - this.address, - eventName, - indexFilterValues, - Exchange.compilerOutput.abi, - callback, - isVerbose, - ); - return subscriptionToken; - } - /** - * Cancel a subscription - * @param subscriptionToken Subscription token returned by `subscribe()` - */ - public unsubscribe(subscriptionToken: string): void { - this._unsubscribe(subscriptionToken); - } - /** - * Cancels all existing subscriptions - */ - public unsubscribeAll(): void { - super._unsubscribeAll(); - } - /** - * Gets historical logs without creating a subscription - * @param eventName The exchange contract event you would like to subscribe to. - * @param blockRange Block range to get logs from. - * @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 `{_from: aUserAddressHex}` - * @return Array of logs that match the parameters - */ - public async getLogsAsync( - eventName: ExchangeEvents, - blockRange: BlockRange, - indexFilterValues: IndexedFilterValues, - ): Promise>> { - assert.doesBelongToStringEnum('eventName', eventName, ExchangeEvents); - assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema); - assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema); - const logs = await this._getLogsAsync( - this.address, - eventName, - blockRange, - indexFilterValues, - Exchange.compilerOutput.abi, - ); - return logs; - } - /** - * Validate if the supplied order is fillable, and throw if it isn't - * @param signedOrder SignedOrder of interest - * @param opts ValidateOrderFillableOpts options (e.g expectedFillTakerTokenAmount. - * If it isn't supplied, we check if the order is fillable for a non-zero amount) - */ - public async validateOrderFillableOrThrowAsync( - signedOrder: SignedOrder, - opts: ValidateOrderFillableOpts = {}, - ): Promise { - assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema); - assert.doesConformToSchema('opts', opts, validateOrderFillableOptsSchema); - - const balanceAllowanceFetcher = new AssetBalanceAndProxyAllowanceFetcher( - this._erc20TokenWrapper, - this._erc721TokenWrapper, - BlockParamLiteral.Latest, - ); - const balanceAllowanceStore = new BalanceAndProxyAllowanceLazyStore(balanceAllowanceFetcher); - const exchangeTradeSimulator = new ExchangeTransferSimulator(balanceAllowanceStore); - - const expectedFillTakerTokenAmountIfExists = opts.expectedFillTakerTokenAmount; - const filledCancelledFetcher = new OrderFilledCancelledFetcher(this, BlockParamLiteral.Latest); - const orderValidationUtils = new OrderValidationUtils(filledCancelledFetcher, this._web3Wrapper.getProvider()); - await orderValidationUtils.validateOrderFillableOrThrowAsync( - exchangeTradeSimulator, - signedOrder, - this.getZRXAssetData(), - expectedFillTakerTokenAmountIfExists, - ); - } - /** - * Validate a call to FillOrder and throw if it wouldn't succeed - * @param signedOrder SignedOrder of interest - * @param fillTakerAssetAmount Amount we'd like to fill the order for - * @param takerAddress The taker of the order - */ - public async validateFillOrderThrowIfInvalidAsync( - signedOrder: SignedOrder, - fillTakerAssetAmount: BigNumber, - takerAddress: string, - ): Promise { - const balanceAllowanceFetcher = new AssetBalanceAndProxyAllowanceFetcher( - this._erc20TokenWrapper, - this._erc721TokenWrapper, - BlockParamLiteral.Latest, - ); - const balanceAllowanceStore = new BalanceAndProxyAllowanceLazyStore(balanceAllowanceFetcher); - const exchangeTradeSimulator = new ExchangeTransferSimulator(balanceAllowanceStore); - - const filledCancelledFetcher = new OrderFilledCancelledFetcher(this, BlockParamLiteral.Latest); - const orderValidationUtils = new OrderValidationUtils(filledCancelledFetcher, this._web3Wrapper.getProvider()); - await orderValidationUtils.validateFillOrderThrowIfInvalidAsync( - exchangeTradeSimulator, - this._web3Wrapper.getProvider(), - signedOrder, - fillTakerAssetAmount, - takerAddress, - this.getZRXAssetData(), - ); - } - /** - * Returns the ZRX asset data used by the exchange contract. - * @return ZRX asset data - */ - public getZRXAssetData(): string { - const zrxAssetData = assetDataUtils.encodeERC20AssetData(this.zrxTokenAddress); - return zrxAssetData; - } - /** - * Returns a Transaction Encoder. Transaction messages exist for the purpose of calling methods on the Exchange contract - * in the context of another address. - * @return TransactionEncoder - */ - public async transactionEncoderAsync(): Promise { - const exchangeInstance = await this._getExchangeContractAsync(); - const encoder = new TransactionEncoder(exchangeInstance); - return encoder; - } - // tslint:enable:no-unused-variable - private async _getExchangeContractAsync(): Promise { - if (!_.isUndefined(this._exchangeContractIfExists)) { - return this._exchangeContractIfExists; - } - const contractInstance = new ExchangeContract( - this.abi, - this.address, - this._web3Wrapper.getProvider(), - this._web3Wrapper.getContractDefaults(), - ); - this._exchangeContractIfExists = contractInstance; - return this._exchangeContractIfExists; - } -} // tslint:disable:max-file-line-count diff --git a/packages/contract-wrappers/src/contract_wrappers/forwarder_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/forwarder_wrapper.ts deleted file mode 100644 index 5497f92b5..000000000 --- a/packages/contract-wrappers/src/contract_wrappers/forwarder_wrapper.ts +++ /dev/null @@ -1,254 +0,0 @@ -import { ForwarderContract } from '@0x/abi-gen-wrappers'; -import { Forwarder } from '@0x/contract-artifacts'; -import { schemas } from '@0x/json-schemas'; -import { SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import { ContractAbi } from 'ethereum-types'; -import * as _ from 'lodash'; - -import { orderTxOptsSchema } from '../schemas/order_tx_opts_schema'; -import { txOptsSchema } from '../schemas/tx_opts_schema'; -import { OrderTransactionOpts } from '../types'; -import { assert } from '../utils/assert'; -import { calldataOptimizationUtils } from '../utils/calldata_optimization_utils'; -import { constants } from '../utils/constants'; -import { _getDefaultContractAddresses } from '../utils/contract_addresses'; -import { decorators } from '../utils/decorators'; -import { utils } from '../utils/utils'; - -import { ContractWrapper } from './contract_wrapper'; - -/** - * This class includes the functionality related to interacting with the Forwarder contract. - */ -export class ForwarderWrapper extends ContractWrapper { - public abi: ContractAbi = Forwarder.compilerOutput.abi; - public address: string; - public zrxTokenAddress: string; - public etherTokenAddress: string; - private _forwarderContractIfExists?: ForwarderContract; - - /** - * Instantiate ForwarderWrapper - * @param web3Wrapper Web3Wrapper instance to use. - * @param networkId Desired networkId. - * @param address The address of the Exchange contract. If undefined, will - * default to the known address corresponding to the networkId. - * @param zrxTokenAddress The address of the ZRXToken contract. If - * undefined, will default to the known address corresponding to the - * networkId. - * @param etherTokenAddress The address of a WETH (Ether token) contract. If - * undefined, will default to the known address corresponding to the - * networkId. - */ - constructor( - web3Wrapper: Web3Wrapper, - networkId: number, - address?: string, - zrxTokenAddress?: string, - etherTokenAddress?: string, - ) { - super(web3Wrapper, networkId); - this.address = _.isUndefined(address) ? _getDefaultContractAddresses(networkId).exchange : address; - this.zrxTokenAddress = _.isUndefined(zrxTokenAddress) - ? _getDefaultContractAddresses(networkId).zrxToken - : zrxTokenAddress; - this.etherTokenAddress = _.isUndefined(etherTokenAddress) - ? _getDefaultContractAddresses(networkId).etherToken - : etherTokenAddress; - } - /** - * Purchases as much of orders' makerAssets as possible by selling up to 95% of transaction's ETH value. - * Any ZRX required to pay fees for primary orders will automatically be purchased by this contract. - * 5% of ETH value is reserved for paying fees to order feeRecipients (in ZRX) and forwarding contract feeRecipient (in ETH). - * Any ETH not spent will be refunded to sender. - * @param signedOrders An array of objects that conform to the SignedOrder interface. All orders must specify the same makerAsset. - * All orders must specify WETH as the takerAsset - * @param takerAddress The user Ethereum address who would like to fill this order. Must be available via the supplied - * Provider provided at instantiation. - * @param ethAmount The amount of eth to send with the transaction (in wei). - * @param signedFeeOrders An array of objects that conform to the SignedOrder interface. All orders must specify ZRX as makerAsset and WETH as takerAsset. - * Used to purchase ZRX for primary order fees. - * @param feePercentage The percentage of WETH sold that will payed as fee to forwarding contract feeRecipient. - * Defaults to 0. - * @param feeRecipientAddress The address that will receive ETH when signedFeeOrders are filled. - * @param orderTransactionOpts Transaction parameters. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async marketSellOrdersWithEthAsync( - signedOrders: SignedOrder[], - takerAddress: string, - ethAmount: BigNumber, - signedFeeOrders: SignedOrder[] = [], - feePercentage: number = 0, - feeRecipientAddress: string = constants.NULL_ADDRESS, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - // type assertions - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); - assert.isBigNumber('ethAmount', ethAmount); - assert.doesConformToSchema('signedFeeOrders', signedFeeOrders, schemas.signedOrdersSchema); - assert.isNumber('feePercentage', feePercentage); - assert.isETHAddressHex('feeRecipientAddress', feeRecipientAddress); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - // other assertions - assert.ordersCanBeUsedForForwarderContract(signedOrders, this.etherTokenAddress); - assert.feeOrdersCanBeUsedForForwarderContract(signedFeeOrders, this.zrxTokenAddress, this.etherTokenAddress); - // format feePercentage - const formattedFeePercentage = utils.numberPercentageToEtherTokenAmountPercentage(feePercentage); - // lowercase input addresses - const normalizedTakerAddress = takerAddress.toLowerCase(); - const normalizedFeeRecipientAddress = feeRecipientAddress.toLowerCase(); - // optimize orders - const optimizedMarketOrders = calldataOptimizationUtils.optimizeForwarderOrders(signedOrders); - const optimizedFeeOrders = calldataOptimizationUtils.optimizeForwarderFeeOrders(signedFeeOrders); - // compile signatures - const signatures = _.map(optimizedMarketOrders, order => order.signature); - const feeSignatures = _.map(optimizedFeeOrders, order => order.signature); - // get contract - const forwarderContractInstance = await this._getForwarderContractAsync(); - // validate transaction - if (orderTransactionOpts.shouldValidate) { - await forwarderContractInstance.marketSellOrdersWithEth.callAsync( - optimizedMarketOrders, - signatures, - optimizedFeeOrders, - feeSignatures, - formattedFeePercentage, - normalizedFeeRecipientAddress, - { - value: ethAmount, - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - } - // send transaction - const txHash = await forwarderContractInstance.marketSellOrdersWithEth.sendTransactionAsync( - optimizedMarketOrders, - signatures, - optimizedFeeOrders, - feeSignatures, - formattedFeePercentage, - feeRecipientAddress, - { - value: ethAmount, - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - /** - * Attempt to purchase makerAssetFillAmount of makerAsset by selling ethAmount provided with transaction. - * Any ZRX required to pay fees for primary orders will automatically be purchased by the contract. - * Any ETH not spent will be refunded to sender. - * @param signedOrders An array of objects that conform to the SignedOrder interface. All orders must specify the same makerAsset. - * All orders must specify WETH as the takerAsset - * @param makerAssetFillAmount The amount of the order (in taker asset baseUnits) that you wish to fill. - * @param takerAddress The user Ethereum address who would like to fill this order. Must be available via the supplied - * Provider provided at instantiation. - * @param ethAmount The amount of eth to send with the transaction (in wei). - * @param signedFeeOrders An array of objects that conform to the SignedOrder interface. All orders must specify ZRX as makerAsset and WETH as takerAsset. - * Used to purchase ZRX for primary order fees. - * @param feePercentage The percentage of WETH sold that will payed as fee to forwarding contract feeRecipient. - * Defaults to 0. - * @param feeRecipientAddress The address that will receive ETH when signedFeeOrders are filled. - * @param orderTransactionOpts Transaction parameters. - * @return Transaction hash. - */ - @decorators.asyncZeroExErrorHandler - public async marketBuyOrdersWithEthAsync( - signedOrders: SignedOrder[], - makerAssetFillAmount: BigNumber, - takerAddress: string, - ethAmount: BigNumber, - signedFeeOrders: SignedOrder[] = [], - feePercentage: number = 0, - feeRecipientAddress: string = constants.NULL_ADDRESS, - orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true }, - ): Promise { - // type assertions - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); - await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); - assert.isBigNumber('ethAmount', ethAmount); - assert.doesConformToSchema('signedFeeOrders', signedFeeOrders, schemas.signedOrdersSchema); - assert.isNumber('feePercentage', feePercentage); - assert.isETHAddressHex('feeRecipientAddress', feeRecipientAddress); - assert.doesConformToSchema('orderTransactionOpts', orderTransactionOpts, orderTxOptsSchema, [txOptsSchema]); - // other assertions - assert.ordersCanBeUsedForForwarderContract(signedOrders, this.etherTokenAddress); - assert.feeOrdersCanBeUsedForForwarderContract(signedFeeOrders, this.zrxTokenAddress, this.etherTokenAddress); - // format feePercentage - const formattedFeePercentage = utils.numberPercentageToEtherTokenAmountPercentage(feePercentage); - // lowercase input addresses - const normalizedTakerAddress = takerAddress.toLowerCase(); - const normalizedFeeRecipientAddress = feeRecipientAddress.toLowerCase(); - // optimize orders - const optimizedMarketOrders = calldataOptimizationUtils.optimizeForwarderOrders(signedOrders); - const optimizedFeeOrders = calldataOptimizationUtils.optimizeForwarderFeeOrders(signedFeeOrders); - // compile signatures - const signatures = _.map(optimizedMarketOrders, order => order.signature); - const feeSignatures = _.map(optimizedFeeOrders, order => order.signature); - // get contract - const forwarderContractInstance = await this._getForwarderContractAsync(); - // validate transaction - if (orderTransactionOpts.shouldValidate) { - await forwarderContractInstance.marketBuyOrdersWithEth.callAsync( - optimizedMarketOrders, - makerAssetFillAmount, - signatures, - optimizedFeeOrders, - feeSignatures, - formattedFeePercentage, - normalizedFeeRecipientAddress, - { - value: ethAmount, - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - } - // send transaction - const txHash = await forwarderContractInstance.marketBuyOrdersWithEth.sendTransactionAsync( - optimizedMarketOrders, - makerAssetFillAmount, - signatures, - optimizedFeeOrders, - feeSignatures, - formattedFeePercentage, - feeRecipientAddress, - { - value: ethAmount, - from: normalizedTakerAddress, - gas: orderTransactionOpts.gasLimit, - gasPrice: orderTransactionOpts.gasPrice, - nonce: orderTransactionOpts.nonce, - }, - ); - return txHash; - } - private async _getForwarderContractAsync(): Promise { - if (!_.isUndefined(this._forwarderContractIfExists)) { - return this._forwarderContractIfExists; - } - const contractInstance = new ForwarderContract( - this.abi, - this.address, - this._web3Wrapper.getProvider(), - this._web3Wrapper.getContractDefaults(), - ); - this._forwarderContractIfExists = contractInstance; - return this._forwarderContractIfExists; - } -} diff --git a/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts deleted file mode 100644 index c186e080e..000000000 --- a/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts +++ /dev/null @@ -1,185 +0,0 @@ -import { OrderValidatorContract } from '@0x/abi-gen-wrappers'; -import { OrderValidator } from '@0x/contract-artifacts'; -import { schemas } from '@0x/json-schemas'; -import { SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import { ContractAbi } from 'ethereum-types'; -import * as _ from 'lodash'; - -import { BalanceAndAllowance, OrderAndTraderInfo, TraderInfo } from '../types'; -import { assert } from '../utils/assert'; -import { _getDefaultContractAddresses } from '../utils/contract_addresses'; - -import { ContractWrapper } from './contract_wrapper'; - -/** - * This class includes the functionality related to interacting with the OrderValidator contract. - */ -export class OrderValidatorWrapper extends ContractWrapper { - public abi: ContractAbi = OrderValidator.compilerOutput.abi; - public address: string; - private _orderValidatorContractIfExists?: OrderValidatorContract; - /** - * Instantiate OrderValidatorWrapper - * @param web3Wrapper Web3Wrapper instance to use. - * @param networkId Desired networkId. - * @param address The address of the OrderValidator contract. If undefined, - * will default to the known address corresponding to the networkId. - */ - constructor(web3Wrapper: Web3Wrapper, networkId: number, address?: string) { - super(web3Wrapper, networkId); - this.address = _.isUndefined(address) ? _getDefaultContractAddresses(networkId).exchange : address; - } - /** - * Get an object conforming to OrderAndTraderInfo containing on-chain information of the provided order and address - * @param order An object conforming to SignedOrder - * @param takerAddress An ethereum address - * @return OrderAndTraderInfo - */ - public async getOrderAndTraderInfoAsync(order: SignedOrder, takerAddress: string): Promise { - assert.doesConformToSchema('order', order, schemas.signedOrderSchema); - assert.isETHAddressHex('takerAddress', takerAddress); - const OrderValidatorContractInstance = await this._getOrderValidatorContractAsync(); - const orderAndTraderInfo = await OrderValidatorContractInstance.getOrderAndTraderInfo.callAsync( - order, - takerAddress, - ); - const result = { - orderInfo: orderAndTraderInfo[0], - traderInfo: orderAndTraderInfo[1], - }; - return result; - } - /** - * Get an array of objects conforming to OrderAndTraderInfo containing on-chain information of the provided orders and addresses - * @param orders An array of objects conforming to SignedOrder - * @param takerAddresses An array of ethereum addresses - * @return array of OrderAndTraderInfo - */ - public async getOrdersAndTradersInfoAsync( - orders: SignedOrder[], - takerAddresses: string[], - ): Promise { - assert.doesConformToSchema('orders', orders, schemas.signedOrdersSchema); - _.forEach(takerAddresses, (takerAddress, index) => - assert.isETHAddressHex(`takerAddresses[${index}]`, takerAddress), - ); - assert.assert(orders.length === takerAddresses.length, 'Expected orders.length to equal takerAddresses.length'); - const OrderValidatorContractInstance = await this._getOrderValidatorContractAsync(); - const ordersAndTradersInfo = await OrderValidatorContractInstance.getOrdersAndTradersInfo.callAsync( - orders, - takerAddresses, - ); - const orderInfos = ordersAndTradersInfo[0]; - const traderInfos = ordersAndTradersInfo[1]; - const result = _.map(orderInfos, (orderInfo, index) => { - const traderInfo = traderInfos[index]; - return { - orderInfo, - traderInfo, - }; - }); - return result; - } - /** - * Get an object conforming to TraderInfo containing on-chain balance and allowances for maker and taker of order - * @param order An object conforming to SignedOrder - * @param takerAddress An ethereum address - * @return TraderInfo - */ - public async getTraderInfoAsync(order: SignedOrder, takerAddress: string): Promise { - assert.doesConformToSchema('order', order, schemas.signedOrderSchema); - assert.isETHAddressHex('takerAddress', takerAddress); - const OrderValidatorContractInstance = await this._getOrderValidatorContractAsync(); - const result = await OrderValidatorContractInstance.getTraderInfo.callAsync(order, takerAddress); - return result; - } - /** - * Get an array of objects conforming to TraderInfo containing on-chain balance and allowances for maker and taker of order - * @param orders An array of objects conforming to SignedOrder - * @param takerAddresses An array of ethereum addresses - * @return array of TraderInfo - */ - public async getTradersInfoAsync(orders: SignedOrder[], takerAddresses: string[]): Promise { - assert.doesConformToSchema('orders', orders, schemas.signedOrdersSchema); - _.forEach(takerAddresses, (takerAddress, index) => - assert.isETHAddressHex(`takerAddresses[${index}]`, takerAddress), - ); - assert.assert(orders.length === takerAddresses.length, 'Expected orders.length to equal takerAddresses.length'); - const OrderValidatorContractInstance = await this._getOrderValidatorContractAsync(); - const result = await OrderValidatorContractInstance.getTradersInfo.callAsync(orders, takerAddresses); - return result; - } - /** - * Get an object conforming to BalanceAndAllowance containing on-chain balance and allowance for some address and assetData - * @param address An ethereum address - * @param assetData An encoded string that can be decoded by a specified proxy contract - * @return BalanceAndAllowance - */ - public async getBalanceAndAllowanceAsync(address: string, assetData: string): Promise { - assert.isETHAddressHex('address', address); - assert.isHexString('assetData', assetData); - const OrderValidatorContractInstance = await this._getOrderValidatorContractAsync(); - const balanceAndAllowance = await OrderValidatorContractInstance.getBalanceAndAllowance.callAsync( - address, - assetData, - ); - const result = { - balance: balanceAndAllowance[0], - allowance: balanceAndAllowance[1], - }; - return result; - } - /** - * Get an array of objects conforming to BalanceAndAllowance containing on-chain balance and allowance for some address and array of assetDatas - * @param address An ethereum address - * @param assetDatas An array of encoded strings that can be decoded by a specified proxy contract - * @return BalanceAndAllowance - */ - public async getBalancesAndAllowancesAsync(address: string, assetDatas: string[]): Promise { - assert.isETHAddressHex('address', address); - _.forEach(assetDatas, (assetData, index) => assert.isHexString(`assetDatas[${index}]`, assetData)); - const OrderValidatorContractInstance = await this._getOrderValidatorContractAsync(); - const balancesAndAllowances = await OrderValidatorContractInstance.getBalancesAndAllowances.callAsync( - address, - assetDatas, - ); - const balances = balancesAndAllowances[0]; - const allowances = balancesAndAllowances[1]; - const result = _.map(balances, (balance, index) => { - const allowance = allowances[index]; - return { - balance, - allowance, - }; - }); - return result; - } - /** - * Get owner address of tokenId by calling `token.ownerOf(tokenId)`, but returns a null owner instead of reverting on an unowned token. - * @param tokenAddress An ethereum address - * @param tokenId An ERC721 tokenId - * @return Owner of tokenId or null address if unowned - */ - public async getERC721TokenOwnerAsync(tokenAddress: string, tokenId: BigNumber): Promise { - assert.isETHAddressHex('tokenAddress', tokenAddress); - assert.isBigNumber('tokenId', tokenId); - const OrderValidatorContractInstance = await this._getOrderValidatorContractAsync(); - const result = await OrderValidatorContractInstance.getERC721TokenOwner.callAsync(tokenAddress, tokenId); - return result; - } - private async _getOrderValidatorContractAsync(): Promise { - if (!_.isUndefined(this._orderValidatorContractIfExists)) { - return this._orderValidatorContractIfExists; - } - const contractInstance = new OrderValidatorContract( - this.abi, - this.address, - this._web3Wrapper.getProvider(), - this._web3Wrapper.getContractDefaults(), - ); - this._orderValidatorContractIfExists = contractInstance; - return this._orderValidatorContractIfExists; - } -} diff --git a/packages/contract-wrappers/src/fetchers/asset_balance_and_proxy_allowance_fetcher.ts b/packages/contract-wrappers/src/fetchers/asset_balance_and_proxy_allowance_fetcher.ts deleted file mode 100644 index c35b24664..000000000 --- a/packages/contract-wrappers/src/fetchers/asset_balance_and_proxy_allowance_fetcher.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { AbstractBalanceAndProxyAllowanceFetcher, assetDataUtils } from '@0x/order-utils'; -import { BigNumber } from '@0x/utils'; -import { BlockParamLiteral } from 'ethereum-types'; -import * as _ from 'lodash'; - -import { ERC20TokenWrapper } from '../contract_wrappers/erc20_token_wrapper'; -import { ERC721TokenWrapper } from '../contract_wrappers/erc721_token_wrapper'; - -export class AssetBalanceAndProxyAllowanceFetcher implements AbstractBalanceAndProxyAllowanceFetcher { - private readonly _erc20Token: ERC20TokenWrapper; - private readonly _erc721Token: ERC721TokenWrapper; - private readonly _stateLayer: BlockParamLiteral; - constructor(erc20Token: ERC20TokenWrapper, erc721Token: ERC721TokenWrapper, stateLayer: BlockParamLiteral) { - this._erc20Token = erc20Token; - this._erc721Token = erc721Token; - this._stateLayer = stateLayer; - } - public async getBalanceAsync(assetData: string, userAddress: string): Promise { - const decodedAssetData = assetDataUtils.decodeAssetDataOrThrow(assetData); - let balance: BigNumber | undefined; - if (assetDataUtils.isERC20AssetData(decodedAssetData)) { - balance = await this._erc20Token.getBalanceAsync(decodedAssetData.tokenAddress, userAddress, { - defaultBlock: this._stateLayer, - }); - } else if (assetDataUtils.isERC721AssetData(decodedAssetData)) { - const tokenOwner = await this._erc721Token.getOwnerOfAsync( - decodedAssetData.tokenAddress, - decodedAssetData.tokenId, - { - defaultBlock: this._stateLayer, - }, - ); - balance = tokenOwner === userAddress ? new BigNumber(1) : new BigNumber(0); - } else if (assetDataUtils.isMultiAssetData(decodedAssetData)) { - // The `balance` for MultiAssetData is the total units of the entire `assetData` that are held by the `userAddress`. - for (const [index, nestedAssetDataElement] of decodedAssetData.nestedAssetData.entries()) { - const nestedAmountElement = decodedAssetData.amounts[index]; - const nestedAssetBalance = (await this.getBalanceAsync( - nestedAssetDataElement, - userAddress, - )).dividedToIntegerBy(nestedAmountElement); - if (_.isUndefined(balance) || nestedAssetBalance.isLessThan(balance)) { - balance = nestedAssetBalance; - } - } - } - return balance as BigNumber; - } - public async getProxyAllowanceAsync(assetData: string, userAddress: string): Promise { - const decodedAssetData = assetDataUtils.decodeAssetDataOrThrow(assetData); - let proxyAllowance: BigNumber | undefined; - if (assetDataUtils.isERC20AssetData(decodedAssetData)) { - proxyAllowance = await this._erc20Token.getProxyAllowanceAsync(decodedAssetData.tokenAddress, userAddress, { - defaultBlock: this._stateLayer, - }); - } else if (assetDataUtils.isERC721AssetData(decodedAssetData)) { - const isApprovedForAll = await this._erc721Token.isProxyApprovedForAllAsync( - decodedAssetData.tokenAddress, - userAddress, - { - defaultBlock: this._stateLayer, - }, - ); - if (isApprovedForAll) { - return new BigNumber(this._erc20Token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS); - } else { - const isApproved = await this._erc721Token.isProxyApprovedAsync( - decodedAssetData.tokenAddress, - decodedAssetData.tokenId, - { - defaultBlock: this._stateLayer, - }, - ); - proxyAllowance = isApproved ? new BigNumber(1) : new BigNumber(0); - } - } else if (assetDataUtils.isMultiAssetData(decodedAssetData)) { - // The `proxyAllowance` for MultiAssetData is the total units of the entire `assetData` that the proxies have been approved to spend by the `userAddress`. - for (const [index, nestedAssetDataElement] of decodedAssetData.nestedAssetData.entries()) { - const nestedAmountElement = decodedAssetData.amounts[index]; - const nestedAssetAllowance = (await this.getProxyAllowanceAsync( - nestedAssetDataElement, - userAddress, - )).dividedToIntegerBy(nestedAmountElement); - if (_.isUndefined(proxyAllowance) || nestedAssetAllowance.isLessThan(proxyAllowance)) { - proxyAllowance = nestedAssetAllowance; - } - } - } - return proxyAllowance as BigNumber; - } -} diff --git a/packages/contract-wrappers/src/fetchers/order_filled_cancelled_fetcher.ts b/packages/contract-wrappers/src/fetchers/order_filled_cancelled_fetcher.ts deleted file mode 100644 index 5d350916c..000000000 --- a/packages/contract-wrappers/src/fetchers/order_filled_cancelled_fetcher.ts +++ /dev/null @@ -1,39 +0,0 @@ -// tslint:disable:no-unnecessary-type-assertion -import { AbstractOrderFilledCancelledFetcher, orderHashUtils } from '@0x/order-utils'; -import { SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import { BlockParamLiteral } from 'ethereum-types'; - -import { ExchangeWrapper } from '../contract_wrappers/exchange_wrapper'; - -export class OrderFilledCancelledFetcher implements AbstractOrderFilledCancelledFetcher { - private readonly _exchange: ExchangeWrapper; - private readonly _stateLayer: BlockParamLiteral; - constructor(exchange: ExchangeWrapper, stateLayer: BlockParamLiteral) { - this._exchange = exchange; - this._stateLayer = stateLayer; - } - public async getFilledTakerAmountAsync(orderHash: string): Promise { - const filledTakerAmount = this._exchange.getFilledTakerAssetAmountAsync(orderHash, { - defaultBlock: this._stateLayer, - }); - return filledTakerAmount; - } - public async isOrderCancelledAsync(signedOrder: SignedOrder): Promise { - const orderHash = orderHashUtils.getOrderHashHex(signedOrder); - const isCancelled = await this._exchange.isCancelledAsync(orderHash); - const orderEpoch = await this._exchange.getOrderEpochAsync( - signedOrder.makerAddress, - signedOrder.senderAddress, - { - defaultBlock: this._stateLayer, - }, - ); - const isCancelledByOrderEpoch = orderEpoch > signedOrder.salt; - return isCancelled || isCancelledByOrderEpoch; - } - public getZRXAssetData(): string { - const zrxAssetData = this._exchange.getZRXAssetData(); - return zrxAssetData; - } -} diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts deleted file mode 100644 index 69bbe3c91..000000000 --- a/packages/contract-wrappers/src/index.ts +++ /dev/null @@ -1,101 +0,0 @@ -export { ContractAddresses } from '@0x/contract-addresses'; - -export { - WETH9Events, - WETH9WithdrawalEventArgs, - WETH9ApprovalEventArgs, - WETH9EventArgs, - WETH9DepositEventArgs, - WETH9TransferEventArgs, - ERC20TokenTransferEventArgs, - ERC20TokenApprovalEventArgs, - ERC20TokenEvents, - ERC20TokenEventArgs, - ERC721TokenApprovalEventArgs, - ERC721TokenApprovalForAllEventArgs, - ERC721TokenTransferEventArgs, - ERC721TokenEvents, - ERC721TokenEventArgs, - ExchangeCancelUpToEventArgs, - ExchangeAssetProxyRegisteredEventArgs, - ExchangeSignatureValidatorApprovalEventArgs, - ExchangeFillEventArgs, - ExchangeCancelEventArgs, - ExchangeEventArgs, - ExchangeEvents, -} from '@0x/abi-gen-wrappers'; - -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 { ForwarderWrapper } from './contract_wrappers/forwarder_wrapper'; -export { OrderValidatorWrapper } from './contract_wrappers/order_validator_wrapper'; -export { DutchAuctionWrapper } from './contract_wrappers/dutch_auction_wrapper'; - -export { TransactionEncoder } from './utils/transaction_encoder'; - -export { - ContractWrappersError, - ForwarderWrapperError, - IndexedFilterValues, - BlockRange, - ContractWrappersConfig, - MethodOpts, - OrderTransactionOpts, - TransactionOpts, - OrderStatus, - OrderInfo, - EventCallback, - DecodedLogEvent, - BalanceAndAllowance, - OrderAndTraderInfo, - TraderInfo, - ValidateOrderFillableOpts, - DutchAuctionData, -} from './types'; - -export { - AssetData, - ERC20AssetData, - ERC721AssetData, - SingleAssetData, - MultiAssetData, - MultiAssetDataWithRecursiveDecoding, - DutchAuctionDetails, - Order, - SignedOrder, - AssetProxyId, -} from '@0x/types'; - -export { - BlockParamLiteral, - BlockParam, - ContractEventArg, - Provider, - ContractAbi, - JSONRPCRequestPayload, - JSONRPCResponsePayload, - JSONRPCErrorCallback, - JSONRPCResponseError, - AbiDefinition, - LogWithDecodedArgs, - FunctionAbi, - EventAbi, - EventParameter, - DecodedLogArgs, - MethodAbi, - ConstructorAbi, - FallbackAbi, - DataItem, - ConstructorStateMutability, - StateMutability, -} from 'ethereum-types'; - -export { AbstractBalanceAndProxyAllowanceFetcher, AbstractOrderFilledCancelledFetcher } from '@0x/order-utils'; - -export { AssetBalanceAndProxyAllowanceFetcher } from './fetchers/asset_balance_and_proxy_allowance_fetcher'; -export { OrderFilledCancelledFetcher } from './fetchers/order_filled_cancelled_fetcher'; diff --git a/packages/contract-wrappers/src/schemas/contract_wrappers_config_schema.ts b/packages/contract-wrappers/src/schemas/contract_wrappers_config_schema.ts deleted file mode 100644 index ae1ce668c..000000000 --- a/packages/contract-wrappers/src/schemas/contract_wrappers_config_schema.ts +++ /dev/null @@ -1,25 +0,0 @@ -export const ContractWrappersConfigSchema = { - id: '/ContractWrappersConfig', - properties: { - networkId: { - type: 'number', - }, - gasPrice: { $ref: '/numberSchema' }, - contractAddresses: { - type: 'object', - properties: { - erc20Proxy: { $ref: '/addressSchema' }, - erc721Proxy: { $ref: '/addressSchema' }, - zrxToken: { $ref: '/addressSchema' }, - etherToken: { $ref: '/addressSchema' }, - exchange: { $ref: '/addressSchema' }, - assetProxyOwner: { $ref: '/addressSchema' }, - forwarder: { $ref: '/addressSchema' }, - orderValidator: { $ref: '/addressSchema' }, - }, - }, - blockPollingIntervalMs: { type: 'number' }, - }, - type: 'object', - required: ['networkId'], -}; diff --git a/packages/contract-wrappers/src/schemas/method_opts_schema.ts b/packages/contract-wrappers/src/schemas/method_opts_schema.ts deleted file mode 100644 index 83003f818..000000000 --- a/packages/contract-wrappers/src/schemas/method_opts_schema.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const methodOptsSchema = { - id: '/MethodOpts', - properties: { - defaultBlock: { $ref: '/blockParamSchema' }, - }, - type: 'object', -}; diff --git a/packages/contract-wrappers/src/schemas/order_tx_opts_schema.ts b/packages/contract-wrappers/src/schemas/order_tx_opts_schema.ts deleted file mode 100644 index 31ad759d5..000000000 --- a/packages/contract-wrappers/src/schemas/order_tx_opts_schema.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const orderTxOptsSchema = { - id: '/OrderTxOpts', - allOf: [{ $ref: '/TxOpts' }], - properties: { - shouldValidate: { type: 'boolean' }, - }, - type: 'object', -}; diff --git a/packages/contract-wrappers/src/schemas/tx_opts_schema.ts b/packages/contract-wrappers/src/schemas/tx_opts_schema.ts deleted file mode 100644 index 1c1588db7..000000000 --- a/packages/contract-wrappers/src/schemas/tx_opts_schema.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const txOptsSchema = { - id: '/TxOpts', - properties: { - gasPrice: { $ref: '/numberSchema' }, - gasLimit: { type: 'number' }, - nonce: { type: 'number' }, - }, - type: 'object', -}; diff --git a/packages/contract-wrappers/src/schemas/validate_order_fillable_opts_schema.ts b/packages/contract-wrappers/src/schemas/validate_order_fillable_opts_schema.ts deleted file mode 100644 index 2e111af04..000000000 --- a/packages/contract-wrappers/src/schemas/validate_order_fillable_opts_schema.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const validateOrderFillableOptsSchema = { - id: '/ValidateOrderFillableOpts', - properties: { - expectedFillTakerTokenAmount: { $ref: '/wholeNumberSchema' }, - }, - type: 'object', -}; diff --git a/packages/contract-wrappers/src/types.ts b/packages/contract-wrappers/src/types.ts deleted file mode 100644 index 29cf8b2c4..000000000 --- a/packages/contract-wrappers/src/types.ts +++ /dev/null @@ -1,218 +0,0 @@ -import { - ERC20TokenEventArgs, - ERC20TokenEvents, - ERC721TokenEventArgs, - ERC721TokenEvents, - ExchangeEventArgs, - ExchangeEvents, - WETH9EventArgs, - WETH9Events, -} from '@0x/abi-gen-wrappers'; -import { ContractAddresses } from '@0x/contract-addresses'; -import { AssetData, OrderState, SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; - -import { BlockParam, ContractEventArg, DecodedLogArgs, LogEntryEvent, LogWithDecodedArgs } from 'ethereum-types'; - -export enum ExchangeWrapperError { - AssetDataMismatch = 'ASSET_DATA_MISMATCH', -} - -export enum ForwarderWrapperError { - CompleteFillFailed = 'COMPLETE_FILL_FAILED', -} - -export enum ContractWrappersError { - ContractNotDeployedOnNetwork = 'CONTRACT_NOT_DEPLOYED_ON_NETWORK', - InsufficientAllowanceForTransfer = 'INSUFFICIENT_ALLOWANCE_FOR_TRANSFER', - InsufficientBalanceForTransfer = 'INSUFFICIENT_BALANCE_FOR_TRANSFER', - InsufficientEthBalanceForDeposit = 'INSUFFICIENT_ETH_BALANCE_FOR_DEPOSIT', - InsufficientWEthBalanceForWithdrawal = 'INSUFFICIENT_WETH_BALANCE_FOR_WITHDRAWAL', - InvalidJump = 'INVALID_JUMP', - OutOfGas = 'OUT_OF_GAS', - SubscriptionNotFound = 'SUBSCRIPTION_NOT_FOUND', - SubscriptionAlreadyPresent = 'SUBSCRIPTION_ALREADY_PRESENT', - ERC721OwnerNotFound = 'ERC_721_OWNER_NOT_FOUND', - ERC721NoApproval = 'ERC_721_NO_APPROVAL', - SignatureRequestDenied = 'SIGNATURE_REQUEST_DENIED', -} - -export enum InternalContractWrappersError { - NoAbiDecoder = 'NO_ABI_DECODER', -} - -export type LogEvent = LogEntryEvent; -export interface DecodedLogEvent { - isRemoved: boolean; - log: LogWithDecodedArgs; -} - -export type EventCallback = ( - err: null | Error, - log?: DecodedLogEvent, -) => void; - -export interface ContractEvent { - logIndex: number; - transactionIndex: number; - transactionHash: string; - blockHash: string; - blockNumber: number; - address: string; - type: string; - event: string; - args: ContractEventArgs; -} - -export type ContractEventArgs = ExchangeEventArgs | ERC20TokenEventArgs | ERC721TokenEventArgs | WETH9EventArgs; - -// [address, name, symbol, decimals, ipfsHash, swarmHash] -export type TokenMetadata = [string, string, string, number, string, string]; - -export interface Token { - name: string; - address: string; - symbol: string; - decimals: number; -} - -export interface TxOpts { - from: string; - gas?: number; - value?: BigNumber; - gasPrice?: BigNumber; -} - -export interface TokenAddressBySymbol { - [symbol: string]: string; -} - -export type ContractEvents = ERC20TokenEvents | ERC721TokenEvents | ExchangeEvents | WETH9Events; - -export interface IndexedFilterValues { - [index: string]: ContractEventArg; -} - -export interface BlockRange { - fromBlock: BlockParam; - toBlock: BlockParam; -} - -export interface OrderFillRequest { - signedOrder: SignedOrder; - takerAssetFillAmount: BigNumber; -} - -export type AsyncMethod = (...args: any[]) => Promise; -export type SyncMethod = (...args: any[]) => any; - -/** - * networkId: The id of the underlying ethereum network your provider is connected to. (1-mainnet, 3-ropsten, 4-rinkeby, 42-kovan, 50-testrpc) - * gasPrice: Gas price to use with every transaction - * contractAddresses: The address of all contracts to use. Defaults to the known addresses based on networkId. - * blockPollingIntervalMs: The interval to use for block polling in event watching methods (defaults to 1000) - */ -export interface ContractWrappersConfig { - networkId: number; - gasPrice?: BigNumber; - contractAddresses?: ContractAddresses; - blockPollingIntervalMs?: number; -} - -/** - * expectedFillTakerTokenAmount: If specified, the validation method will ensure that the - * supplied order maker has a sufficient allowance/balance to fill this amount of the order's - * takerTokenAmount. If not specified, the validation method ensures that the maker has a sufficient - * allowance/balance to fill the entire remaining order amount. - */ -export interface ValidateOrderFillableOpts { - expectedFillTakerTokenAmount?: BigNumber; -} - -/** - * defaultBlock: The block up to which to query the blockchain state. Setting this to a historical block number - * let's the user query the blockchain's state at an arbitrary point in time. In order for this to work, the - * backing Ethereum node must keep the entire historical state of the chain (e.g setting `--pruning=archive` - * flag when running Parity). - */ -export interface MethodOpts { - defaultBlock?: BlockParam; -} - -/** - * gasPrice: Gas price in Wei to use for a transaction - * gasLimit: The amount of gas to send with a transaction (in Gwei) - * nonce: The nonce to use for a transaction. If not specified, it defaults to the next incremented nonce. - */ -export interface TransactionOpts { - gasPrice?: BigNumber; - gasLimit?: number; - nonce?: number; -} - -/** - * shouldValidate: Flag indicating whether the library should make attempts to validate a transaction before - * broadcasting it. For example, order has a valid signature, maker has sufficient funds, etc. Default=true. - */ -export interface OrderTransactionOpts extends TransactionOpts { - shouldValidate?: boolean; -} - -export enum TradeSide { - Maker = 'maker', - Taker = 'taker', -} - -export enum TransferType { - Trade = 'trade', - Fee = 'fee', -} - -export type OnOrderStateChangeCallback = (err: Error | null, orderState?: OrderState) => void; - -export interface OrderInfo { - orderStatus: OrderStatus; - orderHash: string; - orderTakerAssetFilledAmount: BigNumber; -} - -export enum OrderStatus { - Invalid = 0, - InvalidMakerAssetAmount, - InvalidTakerAssetAmount, - Fillable, - Expired, - FullyFilled, - Cancelled, -} - -export interface TraderInfo { - makerBalance: BigNumber; - makerAllowance: BigNumber; - takerBalance: BigNumber; - takerAllowance: BigNumber; - makerZrxBalance: BigNumber; - makerZrxAllowance: BigNumber; - takerZrxBalance: BigNumber; - takerZrxAllowance: BigNumber; -} - -export interface OrderAndTraderInfo { - orderInfo: OrderInfo; - traderInfo: TraderInfo; -} - -export interface BalanceAndAllowance { - balance: BigNumber; - allowance: BigNumber; -} - -export enum DutchAuctionWrapperError { - AssetDataMismatch = 'ASSET_DATA_MISMATCH', -} - -export interface DutchAuctionData { - assetData: AssetData; - beginTimeSeconds: BigNumber; - beginAmount: BigNumber; -} diff --git a/packages/contract-wrappers/src/utils/assert.ts b/packages/contract-wrappers/src/utils/assert.ts deleted file mode 100644 index d30c6b29c..000000000 --- a/packages/contract-wrappers/src/utils/assert.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { assert as sharedAssert } from '@0x/assert'; -// HACK: We need those two unused imports because they're actually used by sharedAssert which gets injected here -import { Schema } from '@0x/json-schemas'; // tslint:disable-line:no-unused-variable -import { assetDataUtils, signatureUtils } from '@0x/order-utils'; -import { Order } from '@0x/types'; // tslint:disable-line:no-unused-variable -import { BigNumber } from '@0x/utils'; // tslint:disable-line:no-unused-variable -import { Web3Wrapper } from '@0x/web3-wrapper'; -import { Provider } from 'ethereum-types'; -import * as _ from 'lodash'; - -import { constants } from './constants'; - -export const assert = { - ...sharedAssert, - async isValidSignatureAsync( - provider: Provider, - orderHash: string, - signature: string, - signerAddress: string, - ): Promise { - const isValid = await signatureUtils.isValidSignatureAsync(provider, orderHash, signature, signerAddress); - sharedAssert.assert(isValid, `Expected order with hash '${orderHash}' to have a valid signature`); - }, - isValidSubscriptionToken(variableName: string, subscriptionToken: string): void { - const uuidRegex = new RegExp('^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'); - const isValid = uuidRegex.test(subscriptionToken); - sharedAssert.assert(isValid, `Expected ${variableName} to be a valid subscription token`); - }, - async isSenderAddressAsync( - variableName: string, - senderAddressHex: string, - web3Wrapper: Web3Wrapper, - ): Promise { - sharedAssert.isETHAddressHex(variableName, senderAddressHex); - const isSenderAddressAvailable = await web3Wrapper.isSenderAddressAvailableAsync(senderAddressHex); - sharedAssert.assert( - isSenderAddressAvailable, - `Specified ${variableName} ${senderAddressHex} isn't available through the supplied web3 provider`, - ); - }, - ordersCanBeUsedForForwarderContract(orders: Order[], etherTokenAddress: string): void { - sharedAssert.assert(!_.isEmpty(orders), 'Expected at least 1 signed order. Found no orders'); - assert.ordersHaveAtMostOneUniqueValueForProperty(orders, 'makerAssetData'); - assert.allTakerAssetDatasAreErc20Token(orders, etherTokenAddress); - assert.allTakerAddressesAreNull(orders); - }, - feeOrdersCanBeUsedForForwarderContract(orders: Order[], zrxTokenAddress: string, etherTokenAddress: string): void { - if (!_.isEmpty(orders)) { - assert.allMakerAssetDatasAreErc20Token(orders, zrxTokenAddress); - assert.allTakerAssetDatasAreErc20Token(orders, etherTokenAddress); - } - }, - allTakerAddressesAreNull(orders: Order[]): void { - assert.ordersHaveAtMostOneUniqueValueForProperty(orders, 'takerAddress', constants.NULL_ADDRESS); - }, - allMakerAssetDatasAreErc20Token(orders: Order[], tokenAddress: string): void { - assert.ordersHaveAtMostOneUniqueValueForProperty( - orders, - 'makerAssetData', - assetDataUtils.encodeERC20AssetData(tokenAddress), - ); - }, - allTakerAssetDatasAreErc20Token(orders: Order[], tokenAddress: string): void { - assert.ordersHaveAtMostOneUniqueValueForProperty( - orders, - 'takerAssetData', - assetDataUtils.encodeERC20AssetData(tokenAddress), - ); - }, - /* - * Asserts that all the orders have the same value for the provided propertyName - * If the value parameter is provided, this asserts that all orders have the prope - */ - ordersHaveAtMostOneUniqueValueForProperty(orders: Order[], propertyName: string, value?: any): void { - const allValues = _.map(orders, order => _.get(order, propertyName)); - sharedAssert.hasAtMostOneUniqueValue( - allValues, - `Expected all orders to have the same ${propertyName} field. Found the following ${propertyName} values: ${JSON.stringify( - allValues, - )}`, - ); - if (!_.isUndefined(value)) { - const firstValue = _.head(allValues); - sharedAssert.assert( - firstValue === value, - `Expected all orders to have a ${propertyName} field with value: ${value}. Found: ${firstValue}`, - ); - } - }, -}; diff --git a/packages/contract-wrappers/src/utils/calldata_optimization_utils.ts b/packages/contract-wrappers/src/utils/calldata_optimization_utils.ts deleted file mode 100644 index bee7acaa7..000000000 --- a/packages/contract-wrappers/src/utils/calldata_optimization_utils.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { SignedOrder } from '@0x/types'; -import * as _ from 'lodash'; - -import { constants } from './constants'; - -export const calldataOptimizationUtils = { - /** - * Takes an array of orders and outputs an array of equivalent orders where all takerAssetData are '0x' and - * all makerAssetData are '0x' except for that of the first order, which retains its original value - * @param orders An array of SignedOrder objects - * @returns optimized orders - */ - optimizeForwarderOrders(orders: SignedOrder[]): SignedOrder[] { - const optimizedOrders = _.map(orders, (order, index) => - transformOrder(order, { - makerAssetData: index === 0 ? order.makerAssetData : constants.NULL_BYTES, - takerAssetData: constants.NULL_BYTES, - }), - ); - return optimizedOrders; - }, - /** - * Takes an array of orders and outputs an array of equivalent orders where all takerAssetData are '0x' and - * all makerAssetData are '0x' - * @param orders An array of SignedOrder objects - * @returns optimized orders - */ - optimizeForwarderFeeOrders(orders: SignedOrder[]): SignedOrder[] { - const optimizedOrders = _.map(orders, (order, index) => - transformOrder(order, { - makerAssetData: constants.NULL_BYTES, - takerAssetData: constants.NULL_BYTES, - }), - ); - return optimizedOrders; - }, -}; - -const transformOrder = (order: SignedOrder, partialOrder: Partial) => { - return { - ...order, - ...partialOrder, - }; -}; diff --git a/packages/contract-wrappers/src/utils/constants.ts b/packages/contract-wrappers/src/utils/constants.ts deleted file mode 100644 index 94afdc112..000000000 --- a/packages/contract-wrappers/src/utils/constants.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { BigNumber } from '@0x/utils'; - -export const constants = { - NULL_ADDRESS: '0x0000000000000000000000000000000000000000', - NULL_BYTES: '0x', - TESTRPC_NETWORK_ID: 50, - INVALID_JUMP_PATTERN: 'invalid JUMP at', - REVERT: 'revert', - OUT_OF_GAS_PATTERN: 'out of gas', - INVALID_TAKER_FORMAT: 'instance.taker is not of a type(s) string', - // tslint:disable-next-line:custom-no-magic-numbers - UNLIMITED_ALLOWANCE_IN_BASE_UNITS: new BigNumber(2).pow(256).minus(1), - DEFAULT_BLOCK_POLLING_INTERVAL: 1000, - ZERO_AMOUNT: new BigNumber(0), - ONE_AMOUNT: new BigNumber(1), - ETHER_TOKEN_DECIMALS: 18, - METAMASK_USER_DENIED_SIGNATURE_PATTERN: 'User denied transaction signature', - TRUST_WALLET_USER_DENIED_SIGNATURE_PATTERN: 'cancelled', -}; diff --git a/packages/contract-wrappers/src/utils/contract_addresses.ts b/packages/contract-wrappers/src/utils/contract_addresses.ts deleted file mode 100644 index dc156e017..000000000 --- a/packages/contract-wrappers/src/utils/contract_addresses.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ContractAddresses, getContractAddressesForNetworkOrThrow, NetworkId } from '@0x/contract-addresses'; -import * as _ from 'lodash'; - -/** - * Returns the default contract addresses for the given networkId or throws with - * a context-specific error message if the networkId is not recognized. - */ -export function _getDefaultContractAddresses(networkId: number): ContractAddresses { - if (!(networkId in NetworkId)) { - throw new Error( - `No default contract addresses found for the given network id (${networkId}). If you want to use ContractWrappers on this network, you must manually pass in the contract address(es) to the constructor.`, - ); - } - return getContractAddressesForNetworkOrThrow(networkId); -} diff --git a/packages/contract-wrappers/src/utils/decorators.ts b/packages/contract-wrappers/src/utils/decorators.ts deleted file mode 100644 index 3acfa3a88..000000000 --- a/packages/contract-wrappers/src/utils/decorators.ts +++ /dev/null @@ -1,110 +0,0 @@ -import * as _ from 'lodash'; - -import { AsyncMethod, ContractWrappersError, SyncMethod } from '../types'; - -import { constants } from './constants'; - -type ErrorTransformer = (err: Error) => Error; - -const contractCallErrorTransformer = (error: Error) => { - if (_.includes(error.message, constants.INVALID_JUMP_PATTERN)) { - return new Error(ContractWrappersError.InvalidJump); - } - if (_.includes(error.message, constants.OUT_OF_GAS_PATTERN)) { - return new Error(ContractWrappersError.OutOfGas); - } - if (_.includes(error.message, constants.REVERT)) { - const revertReason = error.message.split(constants.REVERT)[1].trim(); - return new Error(revertReason); - } - return error; -}; - -const schemaErrorTransformer = (error: Error) => { - if (_.includes(error.message, constants.INVALID_TAKER_FORMAT)) { - const errMsg = - 'Order taker must be of type string. If you want anyone to be able to fill an order - pass NULL_ADDRESS'; - return new Error(errMsg); - } - return error; -}; - -const signatureRequestErrorTransformer = (error: Error) => { - if ( - _.includes(error.message, constants.METAMASK_USER_DENIED_SIGNATURE_PATTERN) || - _.includes(error.message, constants.TRUST_WALLET_USER_DENIED_SIGNATURE_PATTERN) - ) { - const errMsg = ContractWrappersError.SignatureRequestDenied; - return new Error(errMsg); - } - return error; -}; - -/** - * Source: https://stackoverflow.com/a/29837695/3546986 - */ -const asyncErrorHandlerFactory = (errorTransformer: ErrorTransformer) => { - const asyncErrorHandlingDecorator = ( - _target: object, - _key: string | symbol, - descriptor: TypedPropertyDescriptor, - ) => { - const originalMethod = descriptor.value as AsyncMethod; - - // Do not use arrow syntax here. Use a function expression in - // order to use the correct value of `this` in this method - // tslint:disable-next-line:only-arrow-functions - descriptor.value = async function(...args: any[]): Promise { - try { - const result = await originalMethod.apply(this, args); // tslint:disable-line:no-invalid-this - return result; - } catch (error) { - const transformedError = errorTransformer(error); - throw transformedError; - } - }; - - return descriptor; - }; - - return asyncErrorHandlingDecorator; -}; - -const syncErrorHandlerFactory = (errorTransformer: ErrorTransformer) => { - const syncErrorHandlingDecorator = ( - _target: object, - _key: string | symbol, - descriptor: TypedPropertyDescriptor, - ) => { - const originalMethod = descriptor.value as SyncMethod; - - // Do not use arrow syntax here. Use a function expression in - // order to use the correct value of `this` in this method - // tslint:disable-next-line:only-arrow-functions - descriptor.value = function(...args: any[]): any { - try { - const result = originalMethod.apply(this, args); // tslint:disable-line:no-invalid-this - return result; - } catch (error) { - const transformedError = errorTransformer(error); - throw transformedError; - } - }; - - return descriptor; - }; - - return syncErrorHandlingDecorator; -}; - -// _.flow(f, g) = f ∘ g -const zeroExErrorTransformer = _.flow( - schemaErrorTransformer, - contractCallErrorTransformer, - signatureRequestErrorTransformer, -); - -export const decorators = { - asyncZeroExErrorHandler: asyncErrorHandlerFactory(zeroExErrorTransformer), - syncZeroExErrorHandler: syncErrorHandlerFactory(zeroExErrorTransformer), -}; diff --git a/packages/contract-wrappers/src/utils/exchange_transfer_simulator.ts b/packages/contract-wrappers/src/utils/exchange_transfer_simulator.ts deleted file mode 100644 index 4b75ea386..000000000 --- a/packages/contract-wrappers/src/utils/exchange_transfer_simulator.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { ExchangeContractErrs } from '@0x/types'; -import { BigNumber } from '@0x/utils'; - -import { AbstractBalanceAndProxyAllowanceLazyStore } from '../abstract/abstract_balance_and_proxy_allowance_lazy_store'; -import { TradeSide, TransferType } from '../types'; -import { constants } from '../utils/constants'; - -enum FailureReason { - Balance = 'balance', - ProxyAllowance = 'proxyAllowance', -} - -const ERR_MSG_MAPPING = { - [FailureReason.Balance]: { - [TradeSide.Maker]: { - [TransferType.Trade]: ExchangeContractErrs.InsufficientMakerBalance, - [TransferType.Fee]: ExchangeContractErrs.InsufficientMakerFeeBalance, - }, - [TradeSide.Taker]: { - [TransferType.Trade]: ExchangeContractErrs.InsufficientTakerBalance, - [TransferType.Fee]: ExchangeContractErrs.InsufficientTakerFeeBalance, - }, - }, - [FailureReason.ProxyAllowance]: { - [TradeSide.Maker]: { - [TransferType.Trade]: ExchangeContractErrs.InsufficientMakerAllowance, - [TransferType.Fee]: ExchangeContractErrs.InsufficientMakerFeeAllowance, - }, - [TradeSide.Taker]: { - [TransferType.Trade]: ExchangeContractErrs.InsufficientTakerAllowance, - [TransferType.Fee]: ExchangeContractErrs.InsufficientTakerFeeAllowance, - }, - }, -}; - -export class ExchangeTransferSimulator { - private readonly _store: AbstractBalanceAndProxyAllowanceLazyStore; - private static _throwValidationError( - failureReason: FailureReason, - tradeSide: TradeSide, - transferType: TransferType, - ): never { - const errMsg = ERR_MSG_MAPPING[failureReason][tradeSide][transferType]; - throw new Error(errMsg); - } - constructor(store: AbstractBalanceAndProxyAllowanceLazyStore) { - this._store = store; - } - /** - * Simulates transferFrom call performed by a proxy - * @param tokenAddress Address of the token to be transferred - * @param from Owner of the transferred tokens - * @param to Recipient of the transferred tokens - * @param amountInBaseUnits The amount of tokens being transferred - * @param tradeSide Is Maker/Taker transferring - * @param transferType Is it a fee payment or a value transfer - */ - public async transferFromAsync( - tokenAddress: string, - from: string, - to: string, - amountInBaseUnits: BigNumber, - tradeSide: TradeSide, - transferType: TransferType, - ): Promise { - // HACK: When simulating an open order (e.g taker is NULL_ADDRESS), we don't want to adjust balances/ - // allowances for the taker. We do however, want to increase the balance of the maker since the maker - // might be relying on those funds to fill subsequent orders or pay the order's fees. - if (from === constants.NULL_ADDRESS && tradeSide === TradeSide.Taker) { - await this._increaseBalanceAsync(tokenAddress, to, amountInBaseUnits); - return; - } - const balance = await this._store.getBalanceAsync(tokenAddress, from); - const proxyAllowance = await this._store.getProxyAllowanceAsync(tokenAddress, from); - if (proxyAllowance.isLessThan(amountInBaseUnits)) { - ExchangeTransferSimulator._throwValidationError(FailureReason.ProxyAllowance, tradeSide, transferType); - } - if (balance.isLessThan(amountInBaseUnits)) { - ExchangeTransferSimulator._throwValidationError(FailureReason.Balance, tradeSide, transferType); - } - await this._decreaseProxyAllowanceAsync(tokenAddress, from, amountInBaseUnits); - await this._decreaseBalanceAsync(tokenAddress, from, amountInBaseUnits); - await this._increaseBalanceAsync(tokenAddress, to, amountInBaseUnits); - } - private async _decreaseProxyAllowanceAsync( - tokenAddress: string, - userAddress: string, - amountInBaseUnits: BigNumber, - ): Promise { - const proxyAllowance = await this._store.getProxyAllowanceAsync(tokenAddress, userAddress); - if (!proxyAllowance.eq(constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS)) { - this._store.setProxyAllowance(tokenAddress, userAddress, proxyAllowance.minus(amountInBaseUnits)); - } - } - private async _increaseBalanceAsync( - tokenAddress: string, - userAddress: string, - amountInBaseUnits: BigNumber, - ): Promise { - const balance = await this._store.getBalanceAsync(tokenAddress, userAddress); - this._store.setBalance(tokenAddress, userAddress, balance.plus(amountInBaseUnits)); - } - private async _decreaseBalanceAsync( - tokenAddress: string, - userAddress: string, - amountInBaseUnits: BigNumber, - ): Promise { - const balance = await this._store.getBalanceAsync(tokenAddress, userAddress); - this._store.setBalance(tokenAddress, userAddress, balance.minus(amountInBaseUnits)); - } -} diff --git a/packages/contract-wrappers/src/utils/filter_utils.ts b/packages/contract-wrappers/src/utils/filter_utils.ts deleted file mode 100644 index c05be062c..000000000 --- a/packages/contract-wrappers/src/utils/filter_utils.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { ContractAbi, EventAbi, FilterObject, LogEntry } from 'ethereum-types'; -import * as ethUtil from 'ethereumjs-util'; -import * as jsSHA3 from 'js-sha3'; -import * as _ from 'lodash'; -import * as uuid from 'uuid/v4'; - -import { BlockRange, ContractEvents, IndexedFilterValues } from '../types'; - -const TOPIC_LENGTH = 32; - -export const filterUtils = { - generateUUID(): string { - return uuid(); - }, - getFilter( - address: string, - eventName: ContractEvents, - indexFilterValues: IndexedFilterValues, - abi: ContractAbi, - blockRange?: BlockRange, - ): FilterObject { - const eventAbi = _.find(abi, { name: eventName }) as EventAbi; - const eventSignature = filterUtils.getEventSignatureFromAbiByName(eventAbi); - const topicForEventSignature = ethUtil.addHexPrefix(jsSHA3.keccak256(eventSignature)); - const topicsForIndexedArgs = filterUtils.getTopicsForIndexedArgs(eventAbi, indexFilterValues); - const topics = [topicForEventSignature, ...topicsForIndexedArgs]; - let filter: FilterObject = { - address, - topics, - }; - if (!_.isUndefined(blockRange)) { - filter = { - ...blockRange, - ...filter, - }; - } - return filter; - }, - getEventSignatureFromAbiByName(eventAbi: EventAbi): string { - const types = _.map(eventAbi.inputs, 'type'); - const signature = `${eventAbi.name}(${types.join(',')})`; - return signature; - }, - getTopicsForIndexedArgs(abi: EventAbi, indexFilterValues: IndexedFilterValues): Array { - const topics: Array = []; - for (const eventInput of abi.inputs) { - if (!eventInput.indexed) { - continue; - } - if (_.isUndefined(indexFilterValues[eventInput.name])) { - // Null is a wildcard topic in a JSON-RPC call - topics.push(null); - } else { - const value = indexFilterValues[eventInput.name] as string; - const buffer = ethUtil.toBuffer(value); - const paddedBuffer = ethUtil.setLengthLeft(buffer, TOPIC_LENGTH); - const topic = ethUtil.bufferToHex(paddedBuffer); - topics.push(topic); - } - } - return topics; - }, - matchesFilter(log: LogEntry, filter: FilterObject): boolean { - if (!_.isUndefined(filter.address) && log.address !== filter.address) { - return false; - } - if (!_.isUndefined(filter.topics)) { - return filterUtils.doesMatchTopics(log.topics, filter.topics); - } - return true; - }, - doesMatchTopics(logTopics: string[], filterTopics: Array): boolean { - const matchesTopic = _.zipWith(logTopics, filterTopics, filterUtils.matchesTopic.bind(filterUtils)); - const doesMatchTopics = _.every(matchesTopic); - return doesMatchTopics; - }, - matchesTopic(logTopic: string, filterTopic: string[] | string | null): boolean { - if (_.isArray(filterTopic)) { - return _.includes(filterTopic, logTopic); - } - if (_.isString(filterTopic)) { - return filterTopic === logTopic; - } - // null topic is a wildcard - return true; - }, -}; diff --git a/packages/contract-wrappers/src/utils/transaction_encoder.ts b/packages/contract-wrappers/src/utils/transaction_encoder.ts deleted file mode 100644 index 0cf08a8fe..000000000 --- a/packages/contract-wrappers/src/utils/transaction_encoder.ts +++ /dev/null @@ -1,281 +0,0 @@ -import { ExchangeContract } from '@0x/abi-gen-wrappers'; - -import { schemas } from '@0x/json-schemas'; -import { eip712Utils } from '@0x/order-utils'; -import { Order, SignedOrder } from '@0x/types'; -import { BigNumber, signTypedDataUtils } from '@0x/utils'; -import _ = require('lodash'); - -import { assert } from './assert'; - -/** - * Transaction Encoder. Transaction messages exist for the purpose of calling methods on the Exchange contract - * in the context of another address. For example, UserA can encode and sign a fillOrder transaction and UserB - * can submit this to the blockchain. The Exchange context executes as if UserA had directly submitted this transaction. - */ -export class TransactionEncoder { - private readonly _exchangeInstance: ExchangeContract; - constructor(exchangeInstance: ExchangeContract) { - this._exchangeInstance = exchangeInstance; - } - /** - * Encodes the transaction data for use with the Exchange contract. - * @param data The ABI Encoded 0x Exchange method. I.e fillOrder - * @param salt A random value to provide uniqueness and prevent replay attacks. - * @param signerAddress The address which will sign this transaction. - * @return An unsigned hex encoded transaction for use in 0x Exchange executeTransaction. - */ - public getTransactionHex(data: string, salt: BigNumber, signerAddress: string): string { - const exchangeAddress = this._getExchangeContract().address; - const executeTransactionData = { - salt, - signerAddress, - data, - }; - const typedData = eip712Utils.createZeroExTransactionTypedData(executeTransactionData, exchangeAddress); - const eip712MessageBuffer = signTypedDataUtils.generateTypedDataHash(typedData); - const messageHex = `0x${eip712MessageBuffer.toString('hex')}`; - return messageHex; - } - /** - * Encodes a fillOrder transaction. - * @param signedOrder An object that conforms to the SignedOrder interface. - * @param takerAssetFillAmount The amount of the order (in taker asset baseUnits) that you wish to fill. - * @return Hex encoded abi of the function call. - */ - public fillOrderTx(signedOrder: SignedOrder, takerAssetFillAmount: BigNumber): string { - assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema); - assert.isValidBaseUnitAmount('takerAssetFillAmount', takerAssetFillAmount); - const abiEncodedData = this._getExchangeContract().fillOrder.getABIEncodedTransactionData( - signedOrder, - takerAssetFillAmount, - signedOrder.signature, - ); - return abiEncodedData; - } - /** - * Encodes a fillOrderNoThrow transaction. - * @param signedOrder An object that conforms to the SignedOrder interface. - * @param takerAssetFillAmount The amount of the order (in taker asset baseUnits) that you wish to fill. - * @return Hex encoded abi of the function call. - */ - public fillOrderNoThrowTx(signedOrder: SignedOrder, takerAssetFillAmount: BigNumber): string { - assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema); - assert.isValidBaseUnitAmount('takerAssetFillAmount', takerAssetFillAmount); - const abiEncodedData = this._getExchangeContract().fillOrderNoThrow.getABIEncodedTransactionData( - signedOrder, - takerAssetFillAmount, - signedOrder.signature, - ); - return abiEncodedData; - } - /** - * Encodes a fillOrKillOrder transaction. - * @param signedOrder An object that conforms to the SignedOrder interface. - * @param takerAssetFillAmount The amount of the order (in taker asset baseUnits) that you wish to fill. - * @return Hex encoded abi of the function call. - */ - public fillOrKillOrderTx(signedOrder: SignedOrder, takerAssetFillAmount: BigNumber): string { - assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema); - assert.isValidBaseUnitAmount('takerAssetFillAmount', takerAssetFillAmount); - const abiEncodedData = this._getExchangeContract().fillOrKillOrder.getABIEncodedTransactionData( - signedOrder, - takerAssetFillAmount, - signedOrder.signature, - ); - return abiEncodedData; - } - /** - * Encodes a batchFillOrders transaction. - * @param signedOrders An array of signed orders to fill. - * @param takerAssetFillAmounts The amounts of the orders (in taker asset baseUnits) that you wish to fill. - * @return Hex encoded abi of the function call. - */ - public batchFillOrdersTx(signedOrders: SignedOrder[], takerAssetFillAmounts: BigNumber[]): string { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - _.forEach(takerAssetFillAmounts, takerAssetFillAmount => - assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount), - ); - const signatures = _.map(signedOrders, signedOrder => signedOrder.signature); - const abiEncodedData = this._getExchangeContract().batchFillOrders.getABIEncodedTransactionData( - signedOrders, - takerAssetFillAmounts, - signatures, - ); - return abiEncodedData; - } - /** - * Encodes a batchFillOrKillOrders transaction. - * @param signedOrders An array of signed orders to fill. - * @param takerAssetFillAmounts The amounts of the orders (in taker asset baseUnits) that you wish to fill. - * @return Hex encoded abi of the function call. - */ - public batchFillOrKillOrdersTx(signedOrders: SignedOrder[], takerAssetFillAmounts: BigNumber[]): string { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - _.forEach(takerAssetFillAmounts, takerAssetFillAmount => - assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount), - ); - const signatures = _.map(signedOrders, signedOrder => signedOrder.signature); - const abiEncodedData = this._getExchangeContract().batchFillOrKillOrders.getABIEncodedTransactionData( - signedOrders, - takerAssetFillAmounts, - signatures, - ); - return abiEncodedData; - } - /** - * Encodes a batchFillOrdersNoThrow transaction. - * @param signedOrders An array of signed orders to fill. - * @param takerAssetFillAmounts The amounts of the orders (in taker asset baseUnits) that you wish to fill. - * @return Hex encoded abi of the function call. - */ - public batchFillOrdersNoThrowTx(signedOrders: SignedOrder[], takerAssetFillAmounts: BigNumber[]): string { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - _.forEach(takerAssetFillAmounts, takerAssetFillAmount => - assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount), - ); - const signatures = _.map(signedOrders, signedOrder => signedOrder.signature); - const abiEncodedData = this._getExchangeContract().batchFillOrdersNoThrow.getABIEncodedTransactionData( - signedOrders, - takerAssetFillAmounts, - signatures, - ); - return abiEncodedData; - } - /** - * Encodes a batchCancelOrders transaction. - * @param signedOrders An array of orders to cancel. - * @return Hex encoded abi of the function call. - */ - public batchCancelOrdersTx(signedOrders: SignedOrder[]): string { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - const abiEncodedData = this._getExchangeContract().batchCancelOrders.getABIEncodedTransactionData(signedOrders); - return abiEncodedData; - } - /** - * Encodes a cancelOrdersUpTo transaction. - * @param targetOrderEpoch Target order epoch. - * @return Hex encoded abi of the function call. - */ - public cancelOrdersUpToTx(targetOrderEpoch: BigNumber): string { - assert.isBigNumber('targetOrderEpoch', targetOrderEpoch); - const abiEncodedData = this._getExchangeContract().cancelOrdersUpTo.getABIEncodedTransactionData( - targetOrderEpoch, - ); - return abiEncodedData; - } - /** - * Encodes a cancelOrder transaction. - * @param order An object that conforms to the Order or SignedOrder interface. The order you would like to cancel. - * @return Hex encoded abi of the function call. - */ - public cancelOrderTx(order: Order | SignedOrder): string { - assert.doesConformToSchema('order', order, schemas.orderSchema); - const abiEncodedData = this._getExchangeContract().cancelOrder.getABIEncodedTransactionData(order); - return abiEncodedData; - } - /** - * Encodes a marketSellOrders transaction. - * @param signedOrders An array of signed orders to fill. - * @param takerAssetFillAmount Taker asset fill amount. - * @return Hex encoded abi of the function call. - */ - public marketSellOrdersTx(signedOrders: SignedOrder[], takerAssetFillAmount: BigNumber): string { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); - const signatures = _.map(signedOrders, signedOrder => signedOrder.signature); - const abiEncodedData = this._getExchangeContract().marketSellOrders.getABIEncodedTransactionData( - signedOrders, - takerAssetFillAmount, - signatures, - ); - return abiEncodedData; - } - /** - * Encodes a marketSellOrdersNoThrow transaction. - * @param signedOrders An array of signed orders to fill. - * @param takerAssetFillAmount Taker asset fill amount. - * @return Hex encoded abi of the function call. - */ - public marketSellOrdersNoThrowTx(signedOrders: SignedOrder[], takerAssetFillAmount: BigNumber): string { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); - const signatures = _.map(signedOrders, signedOrder => signedOrder.signature); - const abiEncodedData = this._getExchangeContract().marketSellOrdersNoThrow.getABIEncodedTransactionData( - signedOrders, - takerAssetFillAmount, - signatures, - ); - return abiEncodedData; - } - /** - * Encodes a maketBuyOrders transaction. - * @param signedOrders An array of signed orders to fill. - * @param makerAssetFillAmount Maker asset fill amount. - * @return Hex encoded abi of the function call. - */ - public marketBuyOrdersTx(signedOrders: SignedOrder[], makerAssetFillAmount: BigNumber): string { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); - const signatures = _.map(signedOrders, signedOrder => signedOrder.signature); - const abiEncodedData = this._getExchangeContract().marketBuyOrders.getABIEncodedTransactionData( - signedOrders, - makerAssetFillAmount, - signatures, - ); - return abiEncodedData; - } - /** - * Encodes a maketBuyOrdersNoThrow transaction. - * @param signedOrders An array of signed orders to fill. - * @param makerAssetFillAmount Maker asset fill amount. - * @return Hex encoded abi of the function call. - */ - public marketBuyOrdersNoThrowTx(signedOrders: SignedOrder[], makerAssetFillAmount: BigNumber): string { - assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema); - assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); - const signatures = _.map(signedOrders, signedOrder => signedOrder.signature); - const abiEncodedData = this._getExchangeContract().marketBuyOrdersNoThrow.getABIEncodedTransactionData( - signedOrders, - makerAssetFillAmount, - signatures, - ); - return abiEncodedData; - } - /** - * Encodes a preSign transaction. - * @param hash Hash to pre-sign - * @param signerAddress Address that should have signed the given hash. - * @param signature Proof that the hash has been signed by signer. - * @return Hex encoded abi of the function call. - */ - public preSignTx(hash: string, signerAddress: string, signature: string): string { - assert.isHexString('hash', hash); - assert.isETHAddressHex('signerAddress', signerAddress); - assert.isHexString('signature', signature); - const abiEncodedData = this._getExchangeContract().preSign.getABIEncodedTransactionData( - hash, - signerAddress, - signature, - ); - return abiEncodedData; - } - /** - * Encodes a setSignatureValidatorApproval transaction. - * @param validatorAddress Validator contract address. - * @param isApproved Boolean value to set approval to. - * @return Hex encoded abi of the function call. - */ - public setSignatureValidatorApprovalTx(validatorAddress: string, isApproved: boolean): string { - assert.isETHAddressHex('validatorAddress', validatorAddress); - assert.isBoolean('isApproved', isApproved); - const abiEncodedData = this._getExchangeContract().setSignatureValidatorApproval.getABIEncodedTransactionData( - validatorAddress, - isApproved, - ); - return abiEncodedData; - } - private _getExchangeContract(): ExchangeContract { - return this._exchangeInstance; - } -} diff --git a/packages/contract-wrappers/src/utils/utils.ts b/packages/contract-wrappers/src/utils/utils.ts deleted file mode 100644 index ab69385e7..000000000 --- a/packages/contract-wrappers/src/utils/utils.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as _ from 'lodash'; - -import { constants } from './constants'; - -export const utils = { - getCurrentUnixTimestampSec(): BigNumber { - const milisecondsInSecond = 1000; - return new BigNumber(Date.now() / milisecondsInSecond).integerValue(); - }, - getCurrentUnixTimestampMs(): BigNumber { - return new BigNumber(Date.now()); - }, - numberPercentageToEtherTokenAmountPercentage(percentage: number): BigNumber { - return Web3Wrapper.toBaseUnitAmount(constants.ONE_AMOUNT, constants.ETHER_TOKEN_DECIMALS).multipliedBy( - percentage, - ); - }, - removeUndefinedProperties(obj: T): Partial { - return _.pickBy(obj); - }, -}; diff --git a/packages/contract-wrappers/test/calldata_optimization_utils_test.ts b/packages/contract-wrappers/test/calldata_optimization_utils_test.ts deleted file mode 100644 index 6cb8a669e..000000000 --- a/packages/contract-wrappers/test/calldata_optimization_utils_test.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { orderFactory } from '@0x/order-utils/lib/src/order_factory'; -import * as chai from 'chai'; -import * as _ from 'lodash'; -import 'mocha'; - -import { calldataOptimizationUtils } from '../src/utils/calldata_optimization_utils'; -import { constants } from '../src/utils/constants'; - -import { chaiSetup } from './utils/chai_setup'; - -chaiSetup.configure(); -const expect = chai.expect; - -// utility for generating a set of order objects with mostly NULL values -// except for a specified makerAssetData and takerAssetData -const FAKE_ORDERS_COUNT = 5; -const generateFakeOrders = (makerAssetData: string, takerAssetData: string) => - _.map(_.range(FAKE_ORDERS_COUNT), index => { - const order = orderFactory.createOrder( - constants.NULL_ADDRESS, - constants.ZERO_AMOUNT, - makerAssetData, - constants.ZERO_AMOUNT, - takerAssetData, - constants.NULL_ADDRESS, - ); - return { - ...order, - signature: 'dummy signature', - }; - }); - -describe('calldataOptimizationUtils', () => { - const fakeMakerAssetData = 'fakeMakerAssetData'; - const fakeTakerAssetData = 'fakeTakerAssetData'; - const orders = generateFakeOrders(fakeMakerAssetData, fakeTakerAssetData); - describe('#optimizeForwarderOrders', () => { - it('should make makerAssetData `0x` unless first order', () => { - const optimizedOrders = calldataOptimizationUtils.optimizeForwarderOrders(orders); - expect(optimizedOrders[0].makerAssetData).to.equal(fakeMakerAssetData); - const ordersWithoutHead = _.slice(optimizedOrders, 1); - _.forEach(ordersWithoutHead, order => expect(order.makerAssetData).to.equal(constants.NULL_BYTES)); - }); - it('should make all takerAssetData `0x`', () => { - const optimizedOrders = calldataOptimizationUtils.optimizeForwarderOrders(orders); - _.forEach(optimizedOrders, order => expect(order.takerAssetData).to.equal(constants.NULL_BYTES)); - }); - }); - describe('#optimizeForwarderFeeOrders', () => { - it('should make all makerAssetData `0x`', () => { - const optimizedOrders = calldataOptimizationUtils.optimizeForwarderFeeOrders(orders); - _.forEach(optimizedOrders, order => expect(order.makerAssetData).to.equal(constants.NULL_BYTES)); - }); - it('should make all takerAssetData `0x`', () => { - const optimizedOrders = calldataOptimizationUtils.optimizeForwarderFeeOrders(orders); - _.forEach(optimizedOrders, order => expect(order.takerAssetData).to.equal(constants.NULL_BYTES)); - }); - }); -}); diff --git a/packages/contract-wrappers/test/dutch_auction_wrapper_test.ts b/packages/contract-wrappers/test/dutch_auction_wrapper_test.ts deleted file mode 100644 index d7a6ca015..000000000 --- a/packages/contract-wrappers/test/dutch_auction_wrapper_test.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { expectTransactionFailedAsync, getLatestBlockTimestampAsync } from '@0x/contracts-test-utils'; -import { BlockchainLifecycle } from '@0x/dev-utils'; -import { assetDataUtils } from '@0x/order-utils'; -import { RevertReason, SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import * as chai from 'chai'; -import 'mocha'; - -import { ContractWrappers } from '../src'; - -import { chaiSetup } from './utils/chai_setup'; -import { constants } from './utils/constants'; -import { DutchAuctionUtils } from './utils/dutch_auction_utils'; -import { migrateOnceAsync } from './utils/migrate'; -import { tokenUtils } from './utils/token_utils'; -import { provider, web3Wrapper } from './utils/web3_wrapper'; - -chaiSetup.configure(); -const expect = chai.expect; -const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); - -// tslint:disable:custom-no-magic-numbers -describe('DutchAuctionWrapper', () => { - const makerAssetAmount = new BigNumber(5); - const auctionEndTakerAmount = new BigNumber(10); - const auctionBeginTakerAmount = auctionEndTakerAmount.times(2); - const tenMinutesInSeconds = 10 * 60; - let contractWrappers: ContractWrappers; - let exchangeContractAddress: string; - let userAddresses: string[]; - let makerAddress: string; - let takerAddress: string; - let makerTokenAddress: string; - let takerTokenAddress: string; - let buyOrder: SignedOrder; - let sellOrder: SignedOrder; - let makerTokenAssetData: string; - let takerTokenAssetData: string; - let auctionBeginTimeSeconds: BigNumber; - let auctionEndTimeSeconds: BigNumber; - before(async () => { - // setup contract wrappers & addresses - const contractAddresses = await migrateOnceAsync(); - await blockchainLifecycle.startAsync(); - const config = { - networkId: constants.TESTRPC_NETWORK_ID, - contractAddresses, - blockPollingIntervalMs: 10, - }; - contractWrappers = new ContractWrappers(provider, config); - exchangeContractAddress = contractWrappers.exchange.address; - userAddresses = await web3Wrapper.getAvailableAddressesAsync(); - [, makerAddress, takerAddress] = userAddresses; - [makerTokenAddress, takerTokenAddress] = tokenUtils.getDummyERC20TokenAddresses(); - // construct asset data for tokens being swapped - [makerTokenAssetData, takerTokenAssetData] = [ - assetDataUtils.encodeERC20AssetData(makerTokenAddress), - assetDataUtils.encodeERC20AssetData(takerTokenAddress), - ]; - // setup auction details in maker asset data - const currentBlockTimestamp: number = await getLatestBlockTimestampAsync(); - auctionBeginTimeSeconds = new BigNumber(currentBlockTimestamp - tenMinutesInSeconds); - auctionEndTimeSeconds = new BigNumber(currentBlockTimestamp + tenMinutesInSeconds); - // create auction orders - const coinbase = userAddresses[0]; - const dutchAuctionUtils = new DutchAuctionUtils( - web3Wrapper, - coinbase, - exchangeContractAddress, - contractWrappers.erc20Proxy.address, - ); - sellOrder = await dutchAuctionUtils.createSignedSellOrderAsync( - auctionBeginTimeSeconds, - auctionEndTimeSeconds, - auctionBeginTakerAmount, - auctionEndTakerAmount, - makerAssetAmount, - makerTokenAssetData, - takerTokenAssetData, - makerAddress, - constants.NULL_ADDRESS, - ); - buyOrder = await dutchAuctionUtils.createSignedBuyOrderAsync(sellOrder, takerAddress); - }); - after(async () => { - await blockchainLifecycle.revertAsync(); - }); - beforeEach(async () => { - await blockchainLifecycle.startAsync(); - }); - afterEach(async () => { - await blockchainLifecycle.revertAsync(); - }); - describe('#matchOrdersAsync', () => { - it('should match two orders', async () => { - const txHash = await contractWrappers.dutchAuction.matchOrdersAsync(buyOrder, sellOrder, takerAddress); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - }); - it('should throw when invalid transaction and shouldValidate is true', async () => { - // request match with bad buy/sell orders - const badSellOrder = buyOrder; - const badBuyOrder = sellOrder; - return expectTransactionFailedAsync( - contractWrappers.dutchAuction.matchOrdersAsync(badBuyOrder, badSellOrder, takerAddress, { - shouldValidate: true, - }), - RevertReason.InvalidAssetData, - ); - }); - }); - - describe('#getAuctionDetailsAsync', () => { - it('should get auction details', async () => { - // get auction details - const auctionDetails = await contractWrappers.dutchAuction.getAuctionDetailsAsync(sellOrder); - // run some basic sanity checks on the return value - expect(auctionDetails.beginTimeSeconds, 'auctionDetails.beginTimeSeconds').to.be.bignumber.equal( - auctionBeginTimeSeconds, - ); - expect(auctionDetails.beginAmount, 'auctionDetails.beginAmount').to.be.bignumber.equal( - auctionBeginTakerAmount, - ); - expect(auctionDetails.endTimeSeconds, 'auctionDetails.endTimeSeconds').to.be.bignumber.equal( - auctionEndTimeSeconds, - ); - }); - }); -}); diff --git a/packages/contract-wrappers/test/erc20_proxy_wrapper_test.ts b/packages/contract-wrappers/test/erc20_proxy_wrapper_test.ts deleted file mode 100644 index d8dfa4204..000000000 --- a/packages/contract-wrappers/test/erc20_proxy_wrapper_test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import * as chai from 'chai'; - -import { ContractWrappers } from '../src'; - -import { chaiSetup } from './utils/chai_setup'; -import { constants } from './utils/constants'; -import { migrateOnceAsync } from './utils/migrate'; -import { provider } from './utils/web3_wrapper'; - -chaiSetup.configure(); -const expect = chai.expect; - -describe('ERC20ProxyWrapper', () => { - let contractWrappers: ContractWrappers; - before(async () => { - const contractAddresses = await migrateOnceAsync(); - const config = { - networkId: constants.TESTRPC_NETWORK_ID, - contractAddresses, - blockPollingIntervalMs: 10, - }; - contractWrappers = new ContractWrappers(provider, config); - }); - describe('#isAuthorizedAsync', () => { - it('should return false if the address is not authorized', async () => { - const isAuthorized = await contractWrappers.erc20Proxy.isAuthorizedAsync(constants.NULL_ADDRESS); - expect(isAuthorized).to.be.false(); - }); - }); - describe('#getAuthorizedAddressesAsync', () => { - it('should return the list of authorized addresses', async () => { - const authorizedAddresses = await contractWrappers.erc20Proxy.getAuthorizedAddressesAsync(); - for (const authorizedAddress of authorizedAddresses) { - const isAuthorized = await contractWrappers.erc20Proxy.isAuthorizedAsync(authorizedAddress); - expect(isAuthorized).to.be.true(); - } - }); - }); -}); diff --git a/packages/contract-wrappers/test/erc20_wrapper_test.ts b/packages/contract-wrappers/test/erc20_wrapper_test.ts deleted file mode 100644 index 15d3a9ead..000000000 --- a/packages/contract-wrappers/test/erc20_wrapper_test.ts +++ /dev/null @@ -1,634 +0,0 @@ -import { ContractAddresses } from '@0x/contract-addresses'; -import { BlockchainLifecycle, callbackErrorReporter } from '@0x/dev-utils'; -import { EmptyWalletSubprovider, Web3ProviderEngine } from '@0x/subproviders'; -import { DoneCallback } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import * as chai from 'chai'; -import { Provider } from 'ethereum-types'; -import 'mocha'; - -import { - BlockParamLiteral, - BlockRange, - ContractWrappers, - ContractWrappersConfig, - ContractWrappersError, - DecodedLogEvent, - ERC20TokenApprovalEventArgs, - ERC20TokenEvents, - ERC20TokenTransferEventArgs, -} from '../src'; - -import { chaiSetup } from './utils/chai_setup'; -import { constants } from './utils/constants'; -import { migrateOnceAsync } from './utils/migrate'; -import { tokenUtils } from './utils/token_utils'; -import { provider, web3Wrapper } from './utils/web3_wrapper'; - -chaiSetup.configure(); -const expect = chai.expect; -const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); - -describe('ERC20Wrapper', () => { - let contractWrappers: ContractWrappers; - let contractAddresses: ContractAddresses; - let userAddresses: string[]; - let tokens: string[]; - let coinbase: string; - let addressWithoutFunds: string; - let config: ContractWrappersConfig; - - before(async () => { - contractAddresses = await migrateOnceAsync(); - config = { - networkId: constants.TESTRPC_NETWORK_ID, - contractAddresses, - blockPollingIntervalMs: 10, - }; - contractWrappers = new ContractWrappers(provider, config); - userAddresses = await web3Wrapper.getAvailableAddressesAsync(); - tokens = tokenUtils.getDummyERC20TokenAddresses(); - coinbase = userAddresses[0]; - addressWithoutFunds = userAddresses[1]; - }); - beforeEach(async () => { - await blockchainLifecycle.startAsync(); - }); - afterEach(async () => { - await blockchainLifecycle.revertAsync(); - }); - describe('#transferAsync', () => { - let tokenAddress: string; - let transferAmount: BigNumber; - before(() => { - tokenAddress = tokens[0]; - transferAmount = new BigNumber(42); - }); - it('should successfully transfer tokens', async () => { - const fromAddress = coinbase; - const toAddress = addressWithoutFunds; - const preBalance = await contractWrappers.erc20Token.getBalanceAsync(tokenAddress, toAddress); - expect(preBalance).to.be.bignumber.equal(0); - await contractWrappers.erc20Token.transferAsync(tokenAddress, fromAddress, toAddress, transferAmount); - const postBalance = await contractWrappers.erc20Token.getBalanceAsync(tokenAddress, toAddress); - return expect(postBalance).to.be.bignumber.equal(transferAmount); - }); - it('should fail to transfer tokens if fromAddress has an insufficient balance', async () => { - const fromAddress = addressWithoutFunds; - const toAddress = coinbase; - return expect( - contractWrappers.erc20Token.transferAsync(tokenAddress, fromAddress, toAddress, transferAmount), - ).to.be.rejectedWith(ContractWrappersError.InsufficientBalanceForTransfer); - }); - }); - describe('#transferFromAsync', () => { - let tokenAddress: string; - let toAddress: string; - let senderAddress: string; - before(async () => { - tokenAddress = tokens[0]; - toAddress = addressWithoutFunds; - senderAddress = userAddresses[2]; - }); - it('should fail to transfer tokens if fromAddress has insufficient allowance set', async () => { - const fromAddress = coinbase; - const transferAmount = new BigNumber(42); - - const fromAddressBalance = await contractWrappers.erc20Token.getBalanceAsync(tokenAddress, fromAddress); - expect(fromAddressBalance).to.be.bignumber.greaterThan(transferAmount); - - const fromAddressAllowance = await contractWrappers.erc20Token.getAllowanceAsync( - tokenAddress, - fromAddress, - toAddress, - ); - expect(fromAddressAllowance).to.be.bignumber.equal(0); - - return expect( - contractWrappers.erc20Token.transferFromAsync( - tokenAddress, - fromAddress, - toAddress, - senderAddress, - transferAmount, - ), - ).to.be.rejectedWith(ContractWrappersError.InsufficientAllowanceForTransfer); - }); - it('[regression] should fail to transfer tokens if set allowance for toAddress instead of senderAddress', async () => { - const fromAddress = coinbase; - const transferAmount = new BigNumber(42); - - await contractWrappers.erc20Token.setAllowanceAsync(tokenAddress, fromAddress, toAddress, transferAmount); - - return expect( - contractWrappers.erc20Token.transferFromAsync( - tokenAddress, - fromAddress, - toAddress, - senderAddress, - transferAmount, - ), - ).to.be.rejectedWith(ContractWrappersError.InsufficientAllowanceForTransfer); - }); - it('should fail to transfer tokens if fromAddress has insufficient balance', async () => { - const fromAddress = addressWithoutFunds; - const transferAmount = new BigNumber(42); - - const fromAddressBalance = await contractWrappers.erc20Token.getBalanceAsync(tokenAddress, fromAddress); - expect(fromAddressBalance).to.be.bignumber.equal(0); - - await contractWrappers.erc20Token.setAllowanceAsync( - tokenAddress, - fromAddress, - senderAddress, - transferAmount, - ); - const fromAddressAllowance = await contractWrappers.erc20Token.getAllowanceAsync( - tokenAddress, - fromAddress, - senderAddress, - ); - expect(fromAddressAllowance).to.be.bignumber.equal(transferAmount); - - return expect( - contractWrappers.erc20Token.transferFromAsync( - tokenAddress, - fromAddress, - toAddress, - senderAddress, - transferAmount, - ), - ).to.be.rejectedWith(ContractWrappersError.InsufficientBalanceForTransfer); - }); - it('should successfully transfer tokens', async () => { - const fromAddress = coinbase; - - const preBalance = await contractWrappers.erc20Token.getBalanceAsync(tokenAddress, toAddress); - expect(preBalance).to.be.bignumber.equal(0); - - const transferAmount = new BigNumber(42); - await contractWrappers.erc20Token.setAllowanceAsync( - tokenAddress, - fromAddress, - senderAddress, - transferAmount, - ); - - await contractWrappers.erc20Token.transferFromAsync( - tokenAddress, - fromAddress, - toAddress, - senderAddress, - transferAmount, - ); - const postBalance = await contractWrappers.erc20Token.getBalanceAsync(tokenAddress, toAddress); - return expect(postBalance).to.be.bignumber.equal(transferAmount); - }); - }); - describe('#getBalanceAsync', () => { - describe('With provider with accounts', () => { - it('should return the balance for an existing ERC20 token', async () => { - const tokenAddress = tokens[0]; - const ownerAddress = coinbase; - const balance = await contractWrappers.erc20Token.getBalanceAsync(tokenAddress, ownerAddress); - const expectedBalance = new BigNumber('1000000000000000000000000000'); - return expect(balance).to.be.bignumber.equal(expectedBalance); - }); - it('should return a balance of 0 for a non-existent owner address', async () => { - const tokenAddress = tokens[0]; - const nonExistentOwner = '0x198c6ad858f213fb31b6fe809e25040e6b964593'; - const balance = await contractWrappers.erc20Token.getBalanceAsync(tokenAddress, nonExistentOwner); - const expectedBalance = new BigNumber(0); - return expect(balance).to.be.bignumber.equal(expectedBalance); - }); - }); - describe('With provider without accounts', () => { - let zeroExContractWithoutAccounts: ContractWrappers; - before(async () => { - const emptyWalletProvider = addEmptyWalletSubprovider(provider); - zeroExContractWithoutAccounts = new ContractWrappers(emptyWalletProvider, config); - }); - it('should return balance even when called with provider instance without addresses', async () => { - const tokenAddress = tokens[0]; - const ownerAddress = coinbase; - const balance = await zeroExContractWithoutAccounts.erc20Token.getBalanceAsync( - tokenAddress, - ownerAddress, - ); - const expectedBalance = new BigNumber('1000000000000000000000000000'); - return expect(balance).to.be.bignumber.equal(expectedBalance); - }); - }); - }); - describe('#setAllowanceAsync', () => { - it("should set the spender's allowance", async () => { - const tokenAddress = tokens[0]; - const ownerAddress = coinbase; - const spenderAddress = addressWithoutFunds; - - const allowanceBeforeSet = await contractWrappers.erc20Token.getAllowanceAsync( - tokenAddress, - ownerAddress, - spenderAddress, - ); - const expectedAllowanceBeforeAllowanceSet = new BigNumber(0); - expect(allowanceBeforeSet).to.be.bignumber.equal(expectedAllowanceBeforeAllowanceSet); - - const amountInBaseUnits = new BigNumber(50); - await contractWrappers.erc20Token.setAllowanceAsync( - tokenAddress, - ownerAddress, - spenderAddress, - amountInBaseUnits, - ); - - const allowanceAfterSet = await contractWrappers.erc20Token.getAllowanceAsync( - tokenAddress, - ownerAddress, - spenderAddress, - ); - const expectedAllowanceAfterAllowanceSet = amountInBaseUnits; - return expect(allowanceAfterSet).to.be.bignumber.equal(expectedAllowanceAfterAllowanceSet); - }); - }); - describe('#setUnlimitedAllowanceAsync', () => { - it("should set the unlimited spender's allowance", async () => { - const tokenAddress = tokens[0]; - const ownerAddress = coinbase; - const spenderAddress = addressWithoutFunds; - - await contractWrappers.erc20Token.setUnlimitedAllowanceAsync(tokenAddress, ownerAddress, spenderAddress); - const allowance = await contractWrappers.erc20Token.getAllowanceAsync( - tokenAddress, - ownerAddress, - spenderAddress, - ); - return expect(allowance).to.be.bignumber.equal( - contractWrappers.erc20Token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS, - ); - }); - it('should reduce the gas cost for transfers including tokens with unlimited allowance support', async () => { - const transferAmount = new BigNumber(5); - const zrxAddress = contractAddresses.zrxToken; - const [, userWithNormalAllowance, userWithUnlimitedAllowance] = userAddresses; - await contractWrappers.erc20Token.setAllowanceAsync( - zrxAddress, - coinbase, - userWithNormalAllowance, - transferAmount, - ); - await contractWrappers.erc20Token.setUnlimitedAllowanceAsync( - zrxAddress, - coinbase, - userWithUnlimitedAllowance, - ); - - const initBalanceWithNormalAllowance = await web3Wrapper.getBalanceInWeiAsync(userWithNormalAllowance); - const initBalanceWithUnlimitedAllowance = await web3Wrapper.getBalanceInWeiAsync( - userWithUnlimitedAllowance, - ); - - await contractWrappers.erc20Token.transferFromAsync( - zrxAddress, - coinbase, - userWithNormalAllowance, - userWithNormalAllowance, - transferAmount, - ); - await contractWrappers.erc20Token.transferFromAsync( - zrxAddress, - coinbase, - userWithUnlimitedAllowance, - userWithUnlimitedAllowance, - transferAmount, - ); - - const finalBalanceWithNormalAllowance = await web3Wrapper.getBalanceInWeiAsync(userWithNormalAllowance); - const finalBalanceWithUnlimitedAllowance = await web3Wrapper.getBalanceInWeiAsync( - userWithUnlimitedAllowance, - ); - - const normalGasCost = initBalanceWithNormalAllowance.minus(finalBalanceWithNormalAllowance); - const unlimitedGasCost = initBalanceWithUnlimitedAllowance.minus(finalBalanceWithUnlimitedAllowance); - - // In theory the gas cost with unlimited allowance should be smaller, but with testrpc it's actually bigger. - // This needs to be investigated in ethereumjs-vm. This test is essentially a repro. - // TODO: Make this test pass with inverted assertion. - expect(unlimitedGasCost.toNumber()).to.be.gt(normalGasCost.toNumber()); - }); - }); - describe('#getAllowanceAsync', () => { - describe('With provider with accounts', () => { - it('should get the proxy allowance', async () => { - const tokenAddress = tokens[0]; - const ownerAddress = coinbase; - const spenderAddress = addressWithoutFunds; - - const amountInBaseUnits = new BigNumber(50); - await contractWrappers.erc20Token.setAllowanceAsync( - tokenAddress, - ownerAddress, - spenderAddress, - amountInBaseUnits, - ); - - const allowance = await contractWrappers.erc20Token.getAllowanceAsync( - tokenAddress, - ownerAddress, - spenderAddress, - ); - const expectedAllowance = amountInBaseUnits; - return expect(allowance).to.be.bignumber.equal(expectedAllowance); - }); - it('should return 0 if no allowance set yet', async () => { - const tokenAddress = tokens[0]; - const ownerAddress = coinbase; - const spenderAddress = addressWithoutFunds; - const allowance = await contractWrappers.erc20Token.getAllowanceAsync( - tokenAddress, - ownerAddress, - spenderAddress, - ); - const expectedAllowance = new BigNumber(0); - return expect(allowance).to.be.bignumber.equal(expectedAllowance); - }); - }); - describe('With provider without accounts', () => { - let zeroExContractWithoutAccounts: ContractWrappers; - before(async () => { - const emptyWalletProvider = addEmptyWalletSubprovider(provider); - zeroExContractWithoutAccounts = new ContractWrappers(emptyWalletProvider, config); - }); - it('should get the proxy allowance', async () => { - const tokenAddress = tokens[0]; - const ownerAddress = coinbase; - const spenderAddress = addressWithoutFunds; - - const amountInBaseUnits = new BigNumber(50); - await contractWrappers.erc20Token.setAllowanceAsync( - tokenAddress, - ownerAddress, - spenderAddress, - amountInBaseUnits, - ); - - const allowance = await zeroExContractWithoutAccounts.erc20Token.getAllowanceAsync( - tokenAddress, - ownerAddress, - spenderAddress, - ); - const expectedAllowance = amountInBaseUnits; - return expect(allowance).to.be.bignumber.equal(expectedAllowance); - }); - }); - }); - describe('#getProxyAllowanceAsync', () => { - it('should get the proxy allowance', async () => { - const tokenAddress = tokens[0]; - const ownerAddress = coinbase; - - const amountInBaseUnits = new BigNumber(50); - await contractWrappers.erc20Token.setProxyAllowanceAsync(tokenAddress, ownerAddress, amountInBaseUnits); - - const allowance = await contractWrappers.erc20Token.getProxyAllowanceAsync(tokenAddress, ownerAddress); - const expectedAllowance = amountInBaseUnits; - return expect(allowance).to.be.bignumber.equal(expectedAllowance); - }); - }); - describe('#setProxyAllowanceAsync', () => { - it('should set the proxy allowance', async () => { - const tokenAddress = tokens[0]; - const ownerAddress = coinbase; - - const allowanceBeforeSet = await contractWrappers.erc20Token.getProxyAllowanceAsync( - tokenAddress, - ownerAddress, - ); - const expectedAllowanceBeforeAllowanceSet = new BigNumber(0); - expect(allowanceBeforeSet).to.be.bignumber.equal(expectedAllowanceBeforeAllowanceSet); - - const amountInBaseUnits = new BigNumber(50); - await contractWrappers.erc20Token.setProxyAllowanceAsync(tokenAddress, ownerAddress, amountInBaseUnits); - - const allowanceAfterSet = await contractWrappers.erc20Token.getProxyAllowanceAsync( - tokenAddress, - ownerAddress, - ); - const expectedAllowanceAfterAllowanceSet = amountInBaseUnits; - return expect(allowanceAfterSet).to.be.bignumber.equal(expectedAllowanceAfterAllowanceSet); - }); - }); - describe('#setUnlimitedProxyAllowanceAsync', () => { - it('should set the unlimited proxy allowance', async () => { - const tokenAddress = tokens[0]; - const ownerAddress = coinbase; - - await contractWrappers.erc20Token.setUnlimitedProxyAllowanceAsync(tokenAddress, ownerAddress); - const allowance = await contractWrappers.erc20Token.getProxyAllowanceAsync(tokenAddress, ownerAddress); - return expect(allowance).to.be.bignumber.equal( - contractWrappers.erc20Token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS, - ); - }); - }); - describe('#subscribe', () => { - const indexFilterValues = {}; - let tokenAddress: string; - const transferAmount = new BigNumber(42); - const allowanceAmount = new BigNumber(42); - before(() => { - tokenAddress = tokens[0]; - }); - afterEach(() => { - contractWrappers.erc20Token.unsubscribeAll(); - }); - // Hack: Mocha does not allow a test to be both async and have a `done` callback - // Since we need to await the receipt of the event in the `subscribe` callback, - // we do need both. A hack is to make the top-level a sync fn w/ a done callback and then - // wrap the rest of the test in an async block - // Source: https://github.com/mochajs/mocha/issues/2407 - it('Should receive the Transfer event when tokens are transfered', (done: DoneCallback) => { - (async () => { - const callback = callbackErrorReporter.reportNodeCallbackErrors(done)( - (logEvent: DecodedLogEvent) => { - expect(logEvent.isRemoved).to.be.false(); - expect(logEvent.log.logIndex).to.be.equal(0); - expect(logEvent.log.transactionIndex).to.be.equal(0); - expect(logEvent.log.blockNumber).to.be.a('number'); - const args = logEvent.log.args; - expect(args._from).to.be.equal(coinbase); - expect(args._to).to.be.equal(addressWithoutFunds); - expect(args._value).to.be.bignumber.equal(transferAmount); - }, - ); - contractWrappers.erc20Token.subscribe( - tokenAddress, - ERC20TokenEvents.Transfer, - indexFilterValues, - callback, - ); - await contractWrappers.erc20Token.transferAsync( - tokenAddress, - coinbase, - addressWithoutFunds, - transferAmount, - ); - })().catch(done); - }); - it('Should receive the Approval event when allowance is being set', (done: DoneCallback) => { - (async () => { - const callback = callbackErrorReporter.reportNodeCallbackErrors(done)( - (logEvent: DecodedLogEvent) => { - expect(logEvent).to.not.be.undefined(); - expect(logEvent.isRemoved).to.be.false(); - const args = logEvent.log.args; - expect(args._owner).to.be.equal(coinbase); - expect(args._spender).to.be.equal(addressWithoutFunds); - expect(args._value).to.be.bignumber.equal(allowanceAmount); - }, - ); - contractWrappers.erc20Token.subscribe( - tokenAddress, - ERC20TokenEvents.Approval, - indexFilterValues, - callback, - ); - await contractWrappers.erc20Token.setAllowanceAsync( - tokenAddress, - coinbase, - addressWithoutFunds, - allowanceAmount, - ); - })().catch(done); - }); - it('Outstanding subscriptions are cancelled when contractWrappers.unsubscribeAll called', (done: DoneCallback) => { - (async () => { - const callbackNeverToBeCalled = callbackErrorReporter.reportNodeCallbackErrors(done)( - (_logEvent: DecodedLogEvent) => { - done(new Error('Expected this subscription to have been cancelled')); - }, - ); - contractWrappers.erc20Token.subscribe( - tokenAddress, - ERC20TokenEvents.Transfer, - indexFilterValues, - callbackNeverToBeCalled, - ); - const callbackToBeCalled = callbackErrorReporter.reportNodeCallbackErrors(done)(); - contractWrappers.unsubscribeAll(); - contractWrappers.erc20Token.subscribe( - tokenAddress, - ERC20TokenEvents.Transfer, - indexFilterValues, - callbackToBeCalled, - ); - await contractWrappers.erc20Token.transferAsync( - tokenAddress, - coinbase, - addressWithoutFunds, - transferAmount, - ); - })().catch(done); - }); - it('Should cancel subscription when unsubscribe called', (done: DoneCallback) => { - (async () => { - const callbackNeverToBeCalled = callbackErrorReporter.reportNodeCallbackErrors(done)( - (_logEvent: DecodedLogEvent) => { - done(new Error('Expected this subscription to have been cancelled')); - }, - ); - const subscriptionToken = contractWrappers.erc20Token.subscribe( - tokenAddress, - ERC20TokenEvents.Transfer, - indexFilterValues, - callbackNeverToBeCalled, - ); - contractWrappers.erc20Token.unsubscribe(subscriptionToken); - await contractWrappers.erc20Token.transferAsync( - tokenAddress, - coinbase, - addressWithoutFunds, - transferAmount, - ); - done(); - })().catch(done); - }); - }); - describe('#getLogsAsync', () => { - let tokenAddress: string; - let tokenTransferProxyAddress: string; - const blockRange: BlockRange = { - fromBlock: 0, - toBlock: BlockParamLiteral.Latest, - }; - let txHash: string; - before(() => { - tokenAddress = tokens[0]; - tokenTransferProxyAddress = contractWrappers.erc20Proxy.address; - }); - it('should get logs with decoded args emitted by Approval', async () => { - txHash = await contractWrappers.erc20Token.setUnlimitedProxyAllowanceAsync(tokenAddress, coinbase); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const eventName = ERC20TokenEvents.Approval; - const indexFilterValues = {}; - const logs = await contractWrappers.erc20Token.getLogsAsync( - tokenAddress, - eventName, - blockRange, - indexFilterValues, - ); - expect(logs).to.have.length(1); - const args = logs[0].args; - expect(logs[0].event).to.be.equal(eventName); - expect(args._owner).to.be.equal(coinbase); - expect(args._spender).to.be.equal(tokenTransferProxyAddress); - expect(args._value).to.be.bignumber.equal(contractWrappers.erc20Token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS); - }); - it('should only get the logs with the correct event name', async () => { - txHash = await contractWrappers.erc20Token.setUnlimitedProxyAllowanceAsync(tokenAddress, coinbase); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const differentEventName = ERC20TokenEvents.Transfer; - const indexFilterValues = {}; - const logs = await contractWrappers.erc20Token.getLogsAsync( - tokenAddress, - differentEventName, - blockRange, - indexFilterValues, - ); - expect(logs).to.have.length(0); - }); - it('should only get the logs with the correct indexed fields', async () => { - txHash = await contractWrappers.erc20Token.setUnlimitedProxyAllowanceAsync(tokenAddress, coinbase); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - txHash = await contractWrappers.erc20Token.setUnlimitedProxyAllowanceAsync( - tokenAddress, - addressWithoutFunds, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const eventName = ERC20TokenEvents.Approval; - const indexFilterValues = { - _owner: coinbase, - }; - const logs = await contractWrappers.erc20Token.getLogsAsync( - tokenAddress, - eventName, - blockRange, - indexFilterValues, - ); - expect(logs).to.have.length(1); - const args = logs[0].args; - expect(args._owner).to.be.equal(coinbase); - }); - }); -}); -// tslint:disable:max-file-line-count - -function addEmptyWalletSubprovider(p: Provider): Provider { - const providerEngine = new Web3ProviderEngine(); - providerEngine.addProvider(new EmptyWalletSubprovider()); - const currentSubproviders = (p as any)._providers; - for (const subprovider of currentSubproviders) { - providerEngine.addProvider(subprovider); - } - providerEngine.start(); - return providerEngine; -} diff --git a/packages/contract-wrappers/test/erc721_proxy_wrapper_test.ts b/packages/contract-wrappers/test/erc721_proxy_wrapper_test.ts deleted file mode 100644 index 9b0fe8817..000000000 --- a/packages/contract-wrappers/test/erc721_proxy_wrapper_test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import * as chai from 'chai'; - -import { ContractWrappers } from '../src'; - -import { chaiSetup } from './utils/chai_setup'; -import { constants } from './utils/constants'; -import { migrateOnceAsync } from './utils/migrate'; -import { provider } from './utils/web3_wrapper'; - -chaiSetup.configure(); -const expect = chai.expect; - -describe('ERC721ProxyWrapper', () => { - let contractWrappers: ContractWrappers; - before(async () => { - const contractAddresses = await migrateOnceAsync(); - const config = { - networkId: constants.TESTRPC_NETWORK_ID, - contractAddresses, - blockPollingIntervalMs: 10, - }; - contractWrappers = new ContractWrappers(provider, config); - }); - describe('#isAuthorizedAsync', () => { - it('should return false if the address is not authorized', async () => { - const isAuthorized = await contractWrappers.erc721Proxy.isAuthorizedAsync(constants.NULL_ADDRESS); - expect(isAuthorized).to.be.false(); - }); - }); - describe('#getAuthorizedAddressesAsync', () => { - it('should return the list of authorized addresses', async () => { - const authorizedAddresses = await contractWrappers.erc721Proxy.getAuthorizedAddressesAsync(); - for (const authorizedAddress of authorizedAddresses) { - const isAuthorized = await contractWrappers.erc721Proxy.isAuthorizedAsync(authorizedAddress); - expect(isAuthorized).to.be.true(); - } - }); - }); -}); diff --git a/packages/contract-wrappers/test/erc721_wrapper_test.ts b/packages/contract-wrappers/test/erc721_wrapper_test.ts deleted file mode 100644 index a7f1e4c41..000000000 --- a/packages/contract-wrappers/test/erc721_wrapper_test.ts +++ /dev/null @@ -1,466 +0,0 @@ -import { BlockchainLifecycle, callbackErrorReporter } from '@0x/dev-utils'; -import { EmptyWalletSubprovider, Web3ProviderEngine } from '@0x/subproviders'; -import { DoneCallback } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import * as chai from 'chai'; -import { Provider } from 'ethereum-types'; -import 'mocha'; - -import { - BlockParamLiteral, - BlockRange, - ContractWrappers, - ContractWrappersConfig, - ContractWrappersError, - DecodedLogEvent, - ERC721TokenApprovalEventArgs, - ERC721TokenApprovalForAllEventArgs, - ERC721TokenEvents, - ERC721TokenTransferEventArgs, -} from '../src'; - -import { chaiSetup } from './utils/chai_setup'; -import { constants } from './utils/constants'; -import { migrateOnceAsync } from './utils/migrate'; -import { tokenUtils } from './utils/token_utils'; -import { provider, web3Wrapper } from './utils/web3_wrapper'; - -chaiSetup.configure(); -const expect = chai.expect; -const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); - -describe('ERC721Wrapper', () => { - let contractWrappers: ContractWrappers; - let userAddresses: string[]; - let tokens: string[]; - let ownerAddress: string; - let tokenAddress: string; - let anotherOwnerAddress: string; - let operatorAddress: string; - let approvedAddress: string; - let receiverAddress: string; - let config: ContractWrappersConfig; - - before(async () => { - const contractAddresses = await migrateOnceAsync(); - config = { - networkId: constants.TESTRPC_NETWORK_ID, - contractAddresses, - blockPollingIntervalMs: 10, - }; - contractWrappers = new ContractWrappers(provider, config); - userAddresses = await web3Wrapper.getAvailableAddressesAsync(); - tokens = tokenUtils.getDummyERC721TokenAddresses(); - tokenAddress = tokens[0]; - [ownerAddress, operatorAddress, anotherOwnerAddress, approvedAddress, receiverAddress] = userAddresses; - }); - beforeEach(async () => { - await blockchainLifecycle.startAsync(); - }); - afterEach(async () => { - await blockchainLifecycle.revertAsync(); - }); - describe('#transferFromAsync', () => { - it('should fail to transfer NFT if fromAddress has no approvals set', async () => { - const tokenId = await tokenUtils.mintDummyERC721Async(tokenAddress, ownerAddress); - return expect( - contractWrappers.erc721Token.transferFromAsync(tokenAddress, receiverAddress, approvedAddress, tokenId), - ).to.be.rejectedWith(ContractWrappersError.ERC721NoApproval); - }); - it('should successfully transfer tokens when sender is an approved address', async () => { - const tokenId = await tokenUtils.mintDummyERC721Async(tokenAddress, ownerAddress); - let txHash = await contractWrappers.erc721Token.setApprovalAsync(tokenAddress, approvedAddress, tokenId); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const owner = await contractWrappers.erc721Token.getOwnerOfAsync(tokenAddress, tokenId); - expect(owner).to.be.equal(ownerAddress); - txHash = await contractWrappers.erc721Token.transferFromAsync( - tokenAddress, - receiverAddress, - approvedAddress, - tokenId, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const newOwner = await contractWrappers.erc721Token.getOwnerOfAsync(tokenAddress, tokenId); - expect(newOwner).to.be.equal(receiverAddress); - }); - it('should successfully transfer tokens when sender is an approved operator', async () => { - const tokenId = await tokenUtils.mintDummyERC721Async(tokenAddress, ownerAddress); - const isApprovedForAll = true; - let txHash = await contractWrappers.erc721Token.setApprovalForAllAsync( - tokenAddress, - ownerAddress, - operatorAddress, - isApprovedForAll, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const owner = await contractWrappers.erc721Token.getOwnerOfAsync(tokenAddress, tokenId); - expect(owner).to.be.equal(ownerAddress); - txHash = await contractWrappers.erc721Token.transferFromAsync( - tokenAddress, - receiverAddress, - operatorAddress, - tokenId, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const newOwner = await contractWrappers.erc721Token.getOwnerOfAsync(tokenAddress, tokenId); - expect(newOwner).to.be.equal(receiverAddress); - }); - }); - describe('#getTokenCountAsync', () => { - describe('With provider with accounts', () => { - it('should return the count for an existing ERC721 token', async () => { - let tokenCount = await contractWrappers.erc721Token.getTokenCountAsync(tokenAddress, ownerAddress); - expect(tokenCount).to.be.bignumber.equal(0); - await tokenUtils.mintDummyERC721Async(tokenAddress, ownerAddress); - tokenCount = await contractWrappers.erc721Token.getTokenCountAsync(tokenAddress, ownerAddress); - expect(tokenCount).to.be.bignumber.equal(1); - }); - it('should return a balance of 0 for a non-existent owner address', async () => { - const nonExistentOwner = '0x198c6ad858f213fb31b6fe809e25040e6b964593'; - const balance = await contractWrappers.erc721Token.getTokenCountAsync(tokenAddress, nonExistentOwner); - const expectedBalance = new BigNumber(0); - return expect(balance).to.be.bignumber.equal(expectedBalance); - }); - }); - describe('With provider without accounts', () => { - let zeroExContractWithoutAccounts: ContractWrappers; - before(async () => { - const emptyWalletProvider = addEmptyWalletSubprovider(provider); - zeroExContractWithoutAccounts = new ContractWrappers(emptyWalletProvider, config); - }); - it('should return balance even when called with provider instance without addresses', async () => { - const balance = await zeroExContractWithoutAccounts.erc721Token.getTokenCountAsync( - tokenAddress, - ownerAddress, - ); - return expect(balance).to.be.bignumber.equal(0); - }); - }); - }); - describe('#getOwnerOfAsync', () => { - it('should return the owner for an existing ERC721 token', async () => { - const tokenId = await tokenUtils.mintDummyERC721Async(tokenAddress, ownerAddress); - const tokenOwner = await contractWrappers.erc721Token.getOwnerOfAsync(tokenAddress, tokenId); - expect(tokenOwner).to.be.bignumber.equal(ownerAddress); - }); - it('should return undefined not 0 for a non-existent ERC721', async () => { - const fakeTokenId = new BigNumber(42); - return expect(contractWrappers.erc721Token.getOwnerOfAsync(tokenAddress, fakeTokenId)).to.be.rejectedWith( - ContractWrappersError.ERC721OwnerNotFound, - ); - }); - }); - describe('#setApprovalForAllAsync/isApprovedForAllAsync', () => { - it('should check if operator address is approved', async () => { - let isApprovedForAll = await contractWrappers.erc721Token.isApprovedForAllAsync( - tokenAddress, - ownerAddress, - operatorAddress, - ); - expect(isApprovedForAll).to.be.false(); - // set - isApprovedForAll = true; - let txHash = await contractWrappers.erc721Token.setApprovalForAllAsync( - tokenAddress, - ownerAddress, - operatorAddress, - isApprovedForAll, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - isApprovedForAll = await contractWrappers.erc721Token.isApprovedForAllAsync( - tokenAddress, - ownerAddress, - operatorAddress, - ); - expect(isApprovedForAll).to.be.true(); - // unset - txHash = await contractWrappers.erc721Token.setApprovalForAllAsync( - tokenAddress, - ownerAddress, - operatorAddress, - false, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - isApprovedForAll = await contractWrappers.erc721Token.isApprovedForAllAsync( - tokenAddress, - ownerAddress, - operatorAddress, - ); - expect(isApprovedForAll).to.be.false(); - }); - }); - describe('#setProxyApprovalForAllAsync/isProxyApprovedForAllAsync', () => { - it('should check if proxy address is approved', async () => { - let isApprovedForAll = true; - const txHash = await contractWrappers.erc721Token.setProxyApprovalForAllAsync( - tokenAddress, - ownerAddress, - isApprovedForAll, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - isApprovedForAll = await contractWrappers.erc721Token.isProxyApprovedForAllAsync( - tokenAddress, - ownerAddress, - ); - expect(isApprovedForAll).to.be.true(); - }); - }); - describe('#setApprovalAsync/getApprovedIfExistsAsync', () => { - it("should set the spender's approval", async () => { - const tokenId = await tokenUtils.mintDummyERC721Async(tokenAddress, ownerAddress); - - const approvalBeforeSet = await contractWrappers.erc721Token.getApprovedIfExistsAsync( - tokenAddress, - tokenId, - ); - expect(approvalBeforeSet).to.be.undefined(); - await contractWrappers.erc721Token.setApprovalAsync(tokenAddress, approvedAddress, tokenId); - const approvalAfterSet = await contractWrappers.erc721Token.getApprovedIfExistsAsync(tokenAddress, tokenId); - expect(approvalAfterSet).to.be.equal(approvedAddress); - }); - }); - describe('#setProxyApprovalAsync/isProxyApprovedAsync', () => { - it('should set the proxy approval', async () => { - const tokenId = await tokenUtils.mintDummyERC721Async(tokenAddress, ownerAddress); - - const isProxyApprovedBeforeSet = await contractWrappers.erc721Token.isProxyApprovedAsync( - tokenAddress, - tokenId, - ); - expect(isProxyApprovedBeforeSet).to.be.false(); - await contractWrappers.erc721Token.setProxyApprovalAsync(tokenAddress, tokenId); - const isProxyApprovedAfterSet = await contractWrappers.erc721Token.isProxyApprovedAsync( - tokenAddress, - tokenId, - ); - expect(isProxyApprovedAfterSet).to.be.true(); - }); - }); - describe('#subscribe', () => { - const indexFilterValues = {}; - afterEach(() => { - contractWrappers.erc721Token.unsubscribeAll(); - }); - // Hack: Mocha does not allow a test to be both async and have a `done` callback - // Since we need to await the receipt of the event in the `subscribe` callback, - // we do need both. A hack is to make the top-level a sync fn w/ a done callback and then - // wrap the rest of the test in an async block - // Source: https://github.com/mochajs/mocha/issues/2407 - it('Should receive the Transfer event when tokens are transfered', (done: DoneCallback) => { - (async () => { - const callback = callbackErrorReporter.reportNodeCallbackErrors(done)( - (logEvent: DecodedLogEvent) => { - expect(logEvent.isRemoved).to.be.false(); - expect(logEvent.log.logIndex).to.be.equal(0); - expect(logEvent.log.transactionIndex).to.be.equal(0); - expect(logEvent.log.blockNumber).to.be.a('number'); - const args = logEvent.log.args; - expect(args._from).to.be.equal(ownerAddress); - expect(args._to).to.be.equal(receiverAddress); - expect(args._tokenId).to.be.bignumber.equal(tokenId); - }, - ); - const tokenId = await tokenUtils.mintDummyERC721Async(tokenAddress, ownerAddress); - const isApprovedForAll = true; - await web3Wrapper.awaitTransactionSuccessAsync( - await contractWrappers.erc721Token.setApprovalForAllAsync( - tokenAddress, - ownerAddress, - operatorAddress, - isApprovedForAll, - ), - constants.AWAIT_TRANSACTION_MINED_MS, - ); - contractWrappers.erc721Token.subscribe( - tokenAddress, - ERC721TokenEvents.Transfer, - indexFilterValues, - callback, - ); - await web3Wrapper.awaitTransactionSuccessAsync( - await contractWrappers.erc721Token.transferFromAsync( - tokenAddress, - receiverAddress, - operatorAddress, - tokenId, - ), - constants.AWAIT_TRANSACTION_MINED_MS, - ); - })().catch(done); - }); - it('Should receive the Approval event when allowance is being set', (done: DoneCallback) => { - (async () => { - const callback = callbackErrorReporter.reportNodeCallbackErrors(done)( - (logEvent: DecodedLogEvent) => { - expect(logEvent).to.not.be.undefined(); - expect(logEvent.isRemoved).to.be.false(); - const args = logEvent.log.args; - expect(args._owner).to.be.equal(ownerAddress); - expect(args._approved).to.be.equal(approvedAddress); - expect(args._tokenId).to.be.bignumber.equal(tokenId); - }, - ); - contractWrappers.erc721Token.subscribe( - tokenAddress, - ERC721TokenEvents.Approval, - indexFilterValues, - callback, - ); - const tokenId = await tokenUtils.mintDummyERC721Async(tokenAddress, ownerAddress); - await web3Wrapper.awaitTransactionSuccessAsync( - await contractWrappers.erc721Token.setApprovalAsync(tokenAddress, approvedAddress, tokenId), - constants.AWAIT_TRANSACTION_MINED_MS, - ); - })().catch(done); - }); - it('Outstanding subscriptions are cancelled when contractWrappers.unsubscribeAll called', (done: DoneCallback) => { - (async () => { - const callbackNeverToBeCalled = callbackErrorReporter.reportNodeCallbackErrors(done)( - (logEvent: DecodedLogEvent) => { - done(new Error('Expected this subscription to have been cancelled')); - }, - ); - contractWrappers.erc721Token.subscribe( - tokenAddress, - ERC721TokenEvents.Transfer, - indexFilterValues, - callbackNeverToBeCalled, - ); - const callbackToBeCalled = callbackErrorReporter.reportNodeCallbackErrors(done)(); - contractWrappers.unsubscribeAll(); - contractWrappers.erc721Token.subscribe( - tokenAddress, - ERC721TokenEvents.Approval, - indexFilterValues, - callbackToBeCalled, - ); - const tokenId = await tokenUtils.mintDummyERC721Async(tokenAddress, ownerAddress); - await web3Wrapper.awaitTransactionSuccessAsync( - await contractWrappers.erc721Token.setApprovalAsync(tokenAddress, approvedAddress, tokenId), - constants.AWAIT_TRANSACTION_MINED_MS, - ); - done(); - })().catch(done); - }); - it('Should cancel subscription when unsubscribe called', (done: DoneCallback) => { - (async () => { - const callbackNeverToBeCalled = callbackErrorReporter.reportNodeCallbackErrors(done)( - (logEvent: DecodedLogEvent) => { - done(new Error('Expected this subscription to have been cancelled')); - }, - ); - const subscriptionToken = contractWrappers.erc721Token.subscribe( - tokenAddress, - ERC721TokenEvents.ApprovalForAll, - indexFilterValues, - callbackNeverToBeCalled, - ); - contractWrappers.erc721Token.unsubscribe(subscriptionToken); - - const isApproved = true; - await web3Wrapper.awaitTransactionSuccessAsync( - await contractWrappers.erc721Token.setApprovalForAllAsync( - tokenAddress, - ownerAddress, - operatorAddress, - isApproved, - ), - constants.AWAIT_TRANSACTION_MINED_MS, - ); - done(); - })().catch(done); - }); - }); - describe('#getLogsAsync', () => { - const blockRange: BlockRange = { - fromBlock: 0, - toBlock: BlockParamLiteral.Latest, - }; - let txHash: string; - it('should get logs with decoded args emitted by ApprovalForAll', async () => { - const isApprovedForAll = true; - txHash = await contractWrappers.erc721Token.setApprovalForAllAsync( - tokenAddress, - ownerAddress, - operatorAddress, - isApprovedForAll, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const eventName = ERC721TokenEvents.ApprovalForAll; - const indexFilterValues = {}; - const logs = await contractWrappers.erc721Token.getLogsAsync( - tokenAddress, - eventName, - blockRange, - indexFilterValues, - ); - expect(logs).to.have.length(1); - const args = logs[0].args; - expect(logs[0].event).to.be.equal(eventName); - expect(args._owner).to.be.equal(ownerAddress); - expect(args._operator).to.be.equal(operatorAddress); - expect(args._approved).to.be.equal(isApprovedForAll); - }); - it('should only get the logs with the correct event name', async () => { - const isApprovedForAll = true; - txHash = await contractWrappers.erc721Token.setApprovalForAllAsync( - tokenAddress, - ownerAddress, - operatorAddress, - isApprovedForAll, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const differentEventName = ERC721TokenEvents.Transfer; - const indexFilterValues = {}; - const logs = await contractWrappers.erc721Token.getLogsAsync( - tokenAddress, - differentEventName, - blockRange, - indexFilterValues, - ); - expect(logs).to.have.length(0); - }); - it('should only get the logs with the correct indexed fields', async () => { - const isApprovedForAll = true; - txHash = await contractWrappers.erc721Token.setApprovalForAllAsync( - tokenAddress, - ownerAddress, - operatorAddress, - isApprovedForAll, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - txHash = await contractWrappers.erc721Token.setApprovalForAllAsync( - tokenAddress, - anotherOwnerAddress, - operatorAddress, - isApprovedForAll, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const eventName = ERC721TokenEvents.ApprovalForAll; - const indexFilterValues = { - _owner: anotherOwnerAddress, - }; - const logs = await contractWrappers.erc721Token.getLogsAsync( - tokenAddress, - eventName, - blockRange, - indexFilterValues, - ); - expect(logs).to.have.length(1); - const args = logs[0].args; - expect(args._owner).to.be.equal(anotherOwnerAddress); - }); - }); -}); -// tslint:disable:max-file-line-count - -function addEmptyWalletSubprovider(p: Provider): Provider { - const providerEngine = new Web3ProviderEngine(); - providerEngine.addProvider(new EmptyWalletSubprovider()); - const currentSubproviders = (p as any)._providers; - for (const subprovider of currentSubproviders) { - providerEngine.addProvider(subprovider); - } - providerEngine.start(); - return providerEngine; -} diff --git a/packages/contract-wrappers/test/ether_token_wrapper_test.ts b/packages/contract-wrappers/test/ether_token_wrapper_test.ts deleted file mode 100644 index cc2419aa2..000000000 --- a/packages/contract-wrappers/test/ether_token_wrapper_test.ts +++ /dev/null @@ -1,437 +0,0 @@ -import { ContractAddresses } from '@0x/contract-addresses'; -import { BlockchainLifecycle, callbackErrorReporter } from '@0x/dev-utils'; -import { DoneCallback } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as chai from 'chai'; -import 'mocha'; - -import { - BlockParamLiteral, - BlockRange, - ContractWrappers, - ContractWrappersError, - WETH9ApprovalEventArgs, - WETH9DepositEventArgs, - WETH9Events, - WETH9TransferEventArgs, - WETH9WithdrawalEventArgs, -} from '../src'; -import { DecodedLogEvent } from '../src/types'; - -import { chaiSetup } from './utils/chai_setup'; -import { constants } from './utils/constants'; -import { migrateOnceAsync } from './utils/migrate'; -import { provider, web3Wrapper } from './utils/web3_wrapper'; - -chaiSetup.configure(); -const expect = chai.expect; -const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); - -// Since the address depositing/withdrawing ETH/WETH also needs to pay gas costs for the transaction, -// a small amount of ETH will be used to pay this gas cost. We therefore check that the difference between -// the expected balance and actual balance (given the amount of ETH deposited), only deviates by the amount -// required to pay gas costs. -const MAX_REASONABLE_GAS_COST_IN_WEI = 62517; - -describe('EtherTokenWrapper', () => { - let contractWrappers: ContractWrappers; - let contractAddresses: ContractAddresses; - let userAddresses: string[]; - let addressWithETH: string; - let wethContractAddress: string; - let depositWeiAmount: BigNumber; - const decimalPlaces = 7; - let addressWithoutFunds: string; - const gasPrice = new BigNumber(1); - const transferAmount = new BigNumber(42); - const allowanceAmount = new BigNumber(42); - const depositAmount = new BigNumber(42); - const withdrawalAmount = new BigNumber(42); - before(async () => { - contractAddresses = await migrateOnceAsync(); - const config = { - gasPrice, - networkId: constants.TESTRPC_NETWORK_ID, - contractAddresses, - blockPollingIntervalMs: 10, - }; - contractWrappers = new ContractWrappers(provider, config); - userAddresses = await web3Wrapper.getAvailableAddressesAsync(); - addressWithETH = userAddresses[0]; - wethContractAddress = contractAddresses.etherToken; - depositWeiAmount = Web3Wrapper.toWei(new BigNumber(5)); - addressWithoutFunds = userAddresses[1]; - }); - beforeEach(async () => { - await blockchainLifecycle.startAsync(); - }); - afterEach(async () => { - await blockchainLifecycle.revertAsync(); - }); - describe('#getContractAddressIfExists', async () => { - it('should return contract address if connected to a known network', () => { - const contractAddressIfExists = contractAddresses.etherToken; - expect(contractAddressIfExists).to.not.be.undefined(); - }); - it('should throw if connected to a private network and contract addresses are not specified', () => { - const UNKNOWN_NETWORK_NETWORK_ID = 10; - expect( - () => - new ContractWrappers(provider, { - networkId: UNKNOWN_NETWORK_NETWORK_ID, - } as any), - ).to.throw(); - }); - }); - describe('#depositAsync', () => { - it('should successfully deposit ETH and issue Wrapped ETH tokens', async () => { - const preETHBalance = await web3Wrapper.getBalanceInWeiAsync(addressWithETH); - const preWETHBalance = await contractWrappers.erc20Token.getBalanceAsync( - wethContractAddress, - addressWithETH, - ); - expect(preETHBalance).to.be.bignumber.gt(0); - expect(preWETHBalance).to.be.bignumber.equal(0); - - const txHash = await contractWrappers.etherToken.depositAsync( - wethContractAddress, - depositWeiAmount, - addressWithETH, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - - const postETHBalanceInWei = await web3Wrapper.getBalanceInWeiAsync(addressWithETH); - const postWETHBalanceInBaseUnits = await contractWrappers.erc20Token.getBalanceAsync( - wethContractAddress, - addressWithETH, - ); - - expect(postWETHBalanceInBaseUnits).to.be.bignumber.equal(depositWeiAmount); - const remainingETHInWei = preETHBalance.minus(depositWeiAmount); - const gasCost = remainingETHInWei.minus(postETHBalanceInWei); - expect(gasCost).to.be.bignumber.lte(MAX_REASONABLE_GAS_COST_IN_WEI); - }); - it('should throw if user has insufficient ETH balance for deposit', async () => { - const preETHBalance = await web3Wrapper.getBalanceInWeiAsync(addressWithETH); - - const extraETHBalance = Web3Wrapper.toWei(new BigNumber(5)); - const overETHBalanceinWei = preETHBalance.plus(extraETHBalance); - - return expect( - contractWrappers.etherToken.depositAsync(wethContractAddress, overETHBalanceinWei, addressWithETH), - ).to.be.rejectedWith(ContractWrappersError.InsufficientEthBalanceForDeposit); - }); - }); - describe('#withdrawAsync', () => { - it('should successfully withdraw ETH in return for Wrapped ETH tokens', async () => { - const ETHBalanceInWei = await web3Wrapper.getBalanceInWeiAsync(addressWithETH); - - await contractWrappers.etherToken.depositAsync(wethContractAddress, depositWeiAmount, addressWithETH); - - const expectedPreETHBalance = ETHBalanceInWei.minus(depositWeiAmount); - const preETHBalance = await web3Wrapper.getBalanceInWeiAsync(addressWithETH); - const preWETHBalance = await contractWrappers.erc20Token.getBalanceAsync( - wethContractAddress, - addressWithETH, - ); - let gasCost = expectedPreETHBalance.minus(preETHBalance); - expect(gasCost).to.be.bignumber.lte(MAX_REASONABLE_GAS_COST_IN_WEI); - expect(preWETHBalance).to.be.bignumber.equal(depositWeiAmount); - - const txHash = await contractWrappers.etherToken.withdrawAsync( - wethContractAddress, - depositWeiAmount, - addressWithETH, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - - const postETHBalance = await web3Wrapper.getBalanceInWeiAsync(addressWithETH); - const postWETHBalanceInBaseUnits = await contractWrappers.erc20Token.getBalanceAsync( - wethContractAddress, - addressWithETH, - ); - - expect(postWETHBalanceInBaseUnits).to.be.bignumber.equal(0); - const expectedETHBalance = preETHBalance.plus(depositWeiAmount).integerValue(decimalPlaces); - gasCost = expectedETHBalance.minus(postETHBalance); - expect(gasCost).to.be.bignumber.lte(MAX_REASONABLE_GAS_COST_IN_WEI); - }); - it('should throw if user has insufficient WETH balance for withdrawal', async () => { - const preWETHBalance = await contractWrappers.erc20Token.getBalanceAsync( - wethContractAddress, - addressWithETH, - ); - expect(preWETHBalance).to.be.bignumber.equal(0); - - // tslint:disable-next-line:custom-no-magic-numbers - const overWETHBalance = preWETHBalance.plus(999999999); - - return expect( - contractWrappers.etherToken.withdrawAsync(wethContractAddress, overWETHBalance, addressWithETH), - ).to.be.rejectedWith(ContractWrappersError.InsufficientWEthBalanceForWithdrawal); - }); - }); - describe('#subscribe', () => { - const indexFilterValues = {}; - let etherTokenAddress: string; - before(async () => { - etherTokenAddress = contractAddresses.etherToken; - }); - afterEach(() => { - contractWrappers.etherToken.unsubscribeAll(); - }); - // Hack: Mocha does not allow a test to be both async and have a `done` callback - // Since we need to await the receipt of the event in the `subscribe` callback, - // we do need both. A hack is to make the top-level async fn w/ a done callback and then - // wrap the rest of the test in an async block - // Source: https://github.com/mochajs/mocha/issues/2407 - it('Should receive the Transfer event when tokens are transfered', (done: DoneCallback) => { - (async () => { - const callback = callbackErrorReporter.reportNodeCallbackErrors(done)( - (logEvent: DecodedLogEvent) => { - expect(logEvent).to.not.be.undefined(); - expect(logEvent.isRemoved).to.be.false(); - expect(logEvent.log.logIndex).to.be.equal(0); - expect(logEvent.log.transactionIndex).to.be.equal(0); - expect(logEvent.log.blockNumber).to.be.a('number'); - const args = logEvent.log.args; - expect(args._from).to.be.equal(addressWithETH); - expect(args._to).to.be.equal(addressWithoutFunds); - expect(args._value).to.be.bignumber.equal(transferAmount); - }, - ); - await contractWrappers.etherToken.depositAsync(etherTokenAddress, transferAmount, addressWithETH); - contractWrappers.etherToken.subscribe( - etherTokenAddress, - WETH9Events.Transfer, - indexFilterValues, - callback, - ); - await contractWrappers.erc20Token.transferAsync( - etherTokenAddress, - addressWithETH, - addressWithoutFunds, - transferAmount, - ); - })().catch(done); - }); - it('Should receive the Approval event when allowance is being set', (done: DoneCallback) => { - (async () => { - const callback = callbackErrorReporter.reportNodeCallbackErrors(done)( - (logEvent: DecodedLogEvent) => { - expect(logEvent).to.not.be.undefined(); - expect(logEvent.isRemoved).to.be.false(); - const args = logEvent.log.args; - expect(args._owner).to.be.equal(addressWithETH); - expect(args._spender).to.be.equal(addressWithoutFunds); - expect(args._value).to.be.bignumber.equal(allowanceAmount); - }, - ); - contractWrappers.etherToken.subscribe( - etherTokenAddress, - WETH9Events.Approval, - indexFilterValues, - callback, - ); - await contractWrappers.erc20Token.setAllowanceAsync( - etherTokenAddress, - addressWithETH, - addressWithoutFunds, - allowanceAmount, - ); - })().catch(done); - }); - it('Should receive the Deposit event when ether is being deposited', (done: DoneCallback) => { - (async () => { - const callback = callbackErrorReporter.reportNodeCallbackErrors(done)( - (logEvent: DecodedLogEvent) => { - expect(logEvent).to.not.be.undefined(); - expect(logEvent.isRemoved).to.be.false(); - const args = logEvent.log.args; - expect(args._owner).to.be.equal(addressWithETH); - expect(args._value).to.be.bignumber.equal(depositAmount); - }, - ); - contractWrappers.etherToken.subscribe( - etherTokenAddress, - WETH9Events.Deposit, - indexFilterValues, - callback, - ); - await contractWrappers.etherToken.depositAsync(etherTokenAddress, depositAmount, addressWithETH); - })().catch(done); - }); - it('Should receive the Withdrawal event when ether is being withdrawn', (done: DoneCallback) => { - (async () => { - const callback = callbackErrorReporter.reportNodeCallbackErrors(done)( - (logEvent: DecodedLogEvent) => { - expect(logEvent).to.not.be.undefined(); - expect(logEvent.isRemoved).to.be.false(); - const args = logEvent.log.args; - expect(args._owner).to.be.equal(addressWithETH); - expect(args._value).to.be.bignumber.equal(depositAmount); - }, - ); - await contractWrappers.etherToken.depositAsync(etherTokenAddress, depositAmount, addressWithETH); - contractWrappers.etherToken.subscribe( - etherTokenAddress, - WETH9Events.Withdrawal, - indexFilterValues, - callback, - ); - await contractWrappers.etherToken.withdrawAsync(etherTokenAddress, withdrawalAmount, addressWithETH); - })().catch(done); - }); - it('should cancel outstanding subscriptions when contractWrappers.unsubscribeAll is called', (done: DoneCallback) => { - (async () => { - const callbackNeverToBeCalled = callbackErrorReporter.reportNodeCallbackErrors(done)( - (_logEvent: DecodedLogEvent) => { - done(new Error('Expected this subscription to have been cancelled')); - }, - ); - contractWrappers.etherToken.subscribe( - etherTokenAddress, - WETH9Events.Transfer, - indexFilterValues, - callbackNeverToBeCalled, - ); - const callbackToBeCalled = callbackErrorReporter.reportNodeCallbackErrors(done)(); - contractWrappers.unsubscribeAll(); - await contractWrappers.etherToken.depositAsync(etherTokenAddress, transferAmount, addressWithETH); - contractWrappers.etherToken.subscribe( - etherTokenAddress, - WETH9Events.Transfer, - indexFilterValues, - callbackToBeCalled, - ); - await contractWrappers.erc20Token.transferAsync( - etherTokenAddress, - addressWithETH, - addressWithoutFunds, - transferAmount, - ); - })().catch(done); - }); - it('Should cancel subscription when unsubscribe called', (done: DoneCallback) => { - (async () => { - const callbackNeverToBeCalled = callbackErrorReporter.reportNodeCallbackErrors(done)( - (_logEvent: DecodedLogEvent) => { - done(new Error('Expected this subscription to have been cancelled')); - }, - ); - await contractWrappers.etherToken.depositAsync(etherTokenAddress, transferAmount, addressWithETH); - const subscriptionToken = contractWrappers.etherToken.subscribe( - etherTokenAddress, - WETH9Events.Transfer, - indexFilterValues, - callbackNeverToBeCalled, - ); - contractWrappers.etherToken.unsubscribe(subscriptionToken); - await contractWrappers.erc20Token.transferAsync( - etherTokenAddress, - addressWithETH, - addressWithoutFunds, - transferAmount, - ); - done(); - })().catch(done); - }); - }); - describe('#getLogsAsync', () => { - let etherTokenAddress: string; - let erc20ProxyAddress: string; - let blockRange: BlockRange; - let txHash: string; - before(async () => { - addressWithETH = userAddresses[0]; - etherTokenAddress = contractAddresses.etherToken; - erc20ProxyAddress = contractWrappers.erc20Proxy.address; - // Start the block range after all migrations to avoid unexpected logs - const currentBlock: number = 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( - etherTokenAddress, - addressWithETH, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const eventName = WETH9Events.Approval; - const indexFilterValues = {}; - const logs = await contractWrappers.etherToken.getLogsAsync( - etherTokenAddress, - eventName, - blockRange, - indexFilterValues, - ); - expect(logs).to.have.length(1); - const args = logs[0].args; - expect(logs[0].event).to.be.equal(eventName); - expect(args._owner).to.be.equal(addressWithETH); - expect(args._spender).to.be.equal(erc20ProxyAddress); - expect(args._value).to.be.bignumber.equal(contractWrappers.erc20Token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS); - }); - it('should get logs with decoded args emitted by Deposit', async () => { - await contractWrappers.etherToken.depositAsync(etherTokenAddress, depositAmount, addressWithETH); - const eventName = WETH9Events.Deposit; - const indexFilterValues = {}; - const logs = await contractWrappers.etherToken.getLogsAsync( - etherTokenAddress, - eventName, - blockRange, - indexFilterValues, - ); - expect(logs).to.have.length(1); - const args = logs[0].args; - expect(logs[0].event).to.be.equal(eventName); - expect(args._owner).to.be.equal(addressWithETH); - expect(args._value).to.be.bignumber.equal(depositAmount); - }); - it('should only get the logs with the correct event name', async () => { - txHash = await contractWrappers.erc20Token.setUnlimitedProxyAllowanceAsync( - etherTokenAddress, - addressWithETH, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const differentEventName = WETH9Events.Transfer; - const indexFilterValues = {}; - const logs = await contractWrappers.etherToken.getLogsAsync( - etherTokenAddress, - differentEventName, - blockRange, - indexFilterValues, - ); - expect(logs).to.have.length(0); - }); - it('should only get the logs with the correct indexed fields', async () => { - txHash = await contractWrappers.erc20Token.setUnlimitedProxyAllowanceAsync( - etherTokenAddress, - addressWithETH, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - txHash = await contractWrappers.erc20Token.setUnlimitedProxyAllowanceAsync( - etherTokenAddress, - addressWithoutFunds, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const eventName = WETH9Events.Approval; - const indexFilterValues = { - _owner: addressWithETH, - }; - const logs = await contractWrappers.etherToken.getLogsAsync( - etherTokenAddress, - eventName, - blockRange, - indexFilterValues, - ); - expect(logs).to.have.length(1); - const args = logs[0].args; - expect(args._owner).to.be.equal(addressWithETH); - }); - }); -}); diff --git a/packages/contract-wrappers/test/exchange_wrapper_test.ts b/packages/contract-wrappers/test/exchange_wrapper_test.ts deleted file mode 100644 index a1d60dc6e..000000000 --- a/packages/contract-wrappers/test/exchange_wrapper_test.ts +++ /dev/null @@ -1,528 +0,0 @@ -import { BlockchainLifecycle, callbackErrorReporter } from '@0x/dev-utils'; -import { FillScenarios } from '@0x/fill-scenarios'; -import { assetDataUtils, orderHashUtils } from '@0x/order-utils'; -import { DoneCallback, RevertReason, SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import * as chai from 'chai'; -import { BlockParamLiteral } from 'ethereum-types'; -import 'mocha'; - -import { ContractWrappers, ExchangeCancelEventArgs, ExchangeEvents, ExchangeFillEventArgs, OrderStatus } from '../src'; -import { DecodedLogEvent } from '../src/types'; - -import { chaiSetup } from './utils/chai_setup'; -import { constants } from './utils/constants'; -import { migrateOnceAsync } from './utils/migrate'; -import { tokenUtils } from './utils/token_utils'; -import { provider, web3Wrapper } from './utils/web3_wrapper'; - -chaiSetup.configure(); -const expect = chai.expect; -const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); - -describe('ExchangeWrapper', () => { - let contractWrappers: ContractWrappers; - let userAddresses: string[]; - let zrxTokenAddress: string; - let fillScenarios: FillScenarios; - let exchangeContractAddress: string; - let makerTokenAddress: string; - let takerTokenAddress: string; - let makerAddress: string; - let anotherMakerAddress: string; - let takerAddress: string; - let makerAssetData: string; - let takerAssetData: string; - let txHash: string; - const fillableAmount = new BigNumber(5); - const takerTokenFillAmount = new BigNumber(5); - let signedOrder: SignedOrder; - let anotherSignedOrder: SignedOrder; - - before(async () => { - const contractAddresses = await migrateOnceAsync(); - await blockchainLifecycle.startAsync(); - const config = { - networkId: constants.TESTRPC_NETWORK_ID, - contractAddresses, - blockPollingIntervalMs: 10, - }; - contractWrappers = new ContractWrappers(provider, config); - exchangeContractAddress = contractWrappers.exchange.address; - userAddresses = await web3Wrapper.getAvailableAddressesAsync(); - zrxTokenAddress = contractWrappers.exchange.zrxTokenAddress; - fillScenarios = new FillScenarios( - provider, - userAddresses, - zrxTokenAddress, - exchangeContractAddress, - contractWrappers.erc20Proxy.address, - contractWrappers.erc721Proxy.address, - ); - [, makerAddress, takerAddress, , anotherMakerAddress] = userAddresses; - [makerTokenAddress, takerTokenAddress] = tokenUtils.getDummyERC20TokenAddresses(); - [makerAssetData, takerAssetData] = [ - assetDataUtils.encodeERC20AssetData(makerTokenAddress), - assetDataUtils.encodeERC20AssetData(takerTokenAddress), - ]; - signedOrder = await fillScenarios.createFillableSignedOrderAsync( - makerAssetData, - takerAssetData, - makerAddress, - takerAddress, - fillableAmount, - ); - anotherSignedOrder = await fillScenarios.createFillableSignedOrderAsync( - makerAssetData, - takerAssetData, - makerAddress, - takerAddress, - fillableAmount, - ); - }); - after(async () => { - await blockchainLifecycle.revertAsync(); - }); - beforeEach(async () => { - await blockchainLifecycle.startAsync(); - }); - afterEach(async () => { - await blockchainLifecycle.revertAsync(); - }); - describe('fill order(s)', () => { - describe('#fillOrderAsync', () => { - it('should fill a valid order', async () => { - txHash = await contractWrappers.exchange.fillOrderAsync( - signedOrder, - takerTokenFillAmount, - takerAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - }); - }); - describe('#fillOrderNoThrowAsync', () => { - it('should fill a valid order', async () => { - txHash = await contractWrappers.exchange.fillOrderNoThrowAsync( - signedOrder, - takerTokenFillAmount, - takerAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const orderInfo = await contractWrappers.exchange.getOrderInfoAsync(signedOrder); - expect(orderInfo.orderStatus).to.be.equal(OrderStatus.FullyFilled); - }); - }); - describe('#fillOrKillOrderAsync', () => { - it('should fill or kill a valid order', async () => { - txHash = await contractWrappers.exchange.fillOrKillOrderAsync( - signedOrder, - takerTokenFillAmount, - takerAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - }); - }); - describe('#batchFillOrdersAsync', () => { - it('should fill a batch of valid orders', async () => { - const signedOrders = [signedOrder, anotherSignedOrder]; - const takerAssetFillAmounts = [takerTokenFillAmount, takerTokenFillAmount]; - txHash = await contractWrappers.exchange.batchFillOrdersAsync( - signedOrders, - takerAssetFillAmounts, - takerAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - }); - }); - describe('#marketBuyOrdersAsync', () => { - it('should maker buy', async () => { - const signedOrders = [signedOrder, anotherSignedOrder]; - const makerAssetFillAmount = takerTokenFillAmount; - txHash = await contractWrappers.exchange.marketBuyOrdersAsync( - signedOrders, - makerAssetFillAmount, - takerAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - }); - }); - describe('#marketBuyOrdersNoThrowAsync', () => { - it('should no throw maker buy', async () => { - const signedOrders = [signedOrder, anotherSignedOrder]; - const makerAssetFillAmount = takerTokenFillAmount; - txHash = await contractWrappers.exchange.marketBuyOrdersNoThrowAsync( - signedOrders, - makerAssetFillAmount, - takerAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const orderInfo = await contractWrappers.exchange.getOrderInfoAsync(signedOrder); - expect(orderInfo.orderStatus).to.be.equal(OrderStatus.FullyFilled); - }); - }); - describe('#marketSellOrdersAsync', () => { - it('should maker sell', async () => { - const signedOrders = [signedOrder, anotherSignedOrder]; - const takerAssetFillAmount = takerTokenFillAmount; - txHash = await contractWrappers.exchange.marketSellOrdersAsync( - signedOrders, - takerAssetFillAmount, - takerAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - }); - }); - describe('#marketSellOrdersNoThrowAsync', () => { - it('should no throw maker sell', async () => { - const signedOrders = [signedOrder, anotherSignedOrder]; - const takerAssetFillAmount = takerTokenFillAmount; - txHash = await contractWrappers.exchange.marketSellOrdersNoThrowAsync( - signedOrders, - takerAssetFillAmount, - takerAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const orderInfo = await contractWrappers.exchange.getOrderInfoAsync(signedOrder); - expect(orderInfo.orderStatus).to.be.equal(OrderStatus.FullyFilled); - }); - }); - describe('#batchFillOrdersNoThrowAsync', () => { - it('should fill a batch of valid orders', async () => { - const signedOrders = [signedOrder, anotherSignedOrder]; - const takerAssetFillAmounts = [takerTokenFillAmount, takerTokenFillAmount]; - txHash = await contractWrappers.exchange.batchFillOrdersNoThrowAsync( - signedOrders, - takerAssetFillAmounts, - takerAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - let orderInfo = await contractWrappers.exchange.getOrderInfoAsync(signedOrder); - expect(orderInfo.orderStatus).to.be.equal(OrderStatus.FullyFilled); - orderInfo = await contractWrappers.exchange.getOrderInfoAsync(anotherSignedOrder); - expect(orderInfo.orderStatus).to.be.equal(OrderStatus.FullyFilled); - }); - }); - describe('#batchFillOrKillOrdersAsync', () => { - it('should fill or kill a batch of valid orders', async () => { - const signedOrders = [signedOrder, anotherSignedOrder]; - const takerAssetFillAmounts = [takerTokenFillAmount, takerTokenFillAmount]; - txHash = await contractWrappers.exchange.batchFillOrKillOrdersAsync( - signedOrders, - takerAssetFillAmounts, - takerAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - }); - }); - describe('#matchOrdersAsync', () => { - it('should match two valid ordersr', async () => { - const matchingSignedOrder = await fillScenarios.createFillableSignedOrderAsync( - takerAssetData, - makerAssetData, - makerAddress, - takerAddress, - fillableAmount, - ); - txHash = await contractWrappers.exchange.matchOrdersAsync( - signedOrder, - matchingSignedOrder, - takerAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - }); - }); - }); - describe('cancel order(s)', () => { - describe('#cancelOrderAsync', () => { - it('should cancel a valid order', async () => { - txHash = await contractWrappers.exchange.cancelOrderAsync(signedOrder); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - }); - }); - describe('#batchCancelOrdersAsync', () => { - it('should cancel a batch of valid orders', async () => { - const orders = [signedOrder, anotherSignedOrder]; - txHash = await contractWrappers.exchange.batchCancelOrdersAsync(orders); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - }); - }); - describe('#cancelOrdersUpTo/getOrderEpochAsync', () => { - it('should cancel orders up to target order epoch', async () => { - const targetOrderEpoch = new BigNumber(42); - txHash = await contractWrappers.exchange.cancelOrdersUpToAsync(targetOrderEpoch, makerAddress); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const orderEpoch = await contractWrappers.exchange.getOrderEpochAsync( - makerAddress, - constants.NULL_ADDRESS, - ); - expect(orderEpoch).to.be.bignumber.equal(targetOrderEpoch.plus(1)); - }); - }); - }); - describe('#getZRXAssetData', () => { - 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); - }); - }); - describe('#getOrderInfoAsync', () => { - it('should get the order info', async () => { - const orderInfo = await contractWrappers.exchange.getOrderInfoAsync(signedOrder); - const orderHash = orderHashUtils.getOrderHashHex(signedOrder); - expect(orderInfo.orderHash).to.be.equal(orderHash); - }); - }); - describe('#getOrdersInfoAsync', () => { - it('should get the orders info', async () => { - const ordersInfo = await contractWrappers.exchange.getOrdersInfoAsync([signedOrder, anotherSignedOrder]); - const orderHash = orderHashUtils.getOrderHashHex(signedOrder); - expect(ordersInfo[0].orderHash).to.be.equal(orderHash); - const anotherOrderHash = orderHashUtils.getOrderHashHex(anotherSignedOrder); - expect(ordersInfo[1].orderHash).to.be.equal(anotherOrderHash); - }); - }); - describe('#validateOrderFillableOrThrowAsync', () => { - it('should throw if signature is invalid', async () => { - const signedOrderWithInvalidSignature = { - ...signedOrder, - signature: - '0x1b61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace225403', - }; - - expect( - contractWrappers.exchange.validateOrderFillableOrThrowAsync(signedOrderWithInvalidSignature), - ).to.eventually.to.be.rejectedWith(RevertReason.InvalidOrderSignature); - }); - }); - describe('#isValidSignature', () => { - it('should check if the signature is valid', async () => { - const orderHash = orderHashUtils.getOrderHashHex(signedOrder); - let isValid = await contractWrappers.exchange.isValidSignatureAsync( - orderHash, - signedOrder.makerAddress, - signedOrder.signature, - ); - expect(isValid).to.be.true(); - isValid = await contractWrappers.exchange.isValidSignatureAsync( - orderHash, - signedOrder.takerAddress, - signedOrder.signature, - ); - expect(isValid).to.be.false(); - }); - }); - describe('#isAllowedValidatorAsync', () => { - it('should check if the validator is allowed', async () => { - const signerAddress = makerAddress; - const validatorAddress = constants.NULL_ADDRESS; - const isAllowed = await contractWrappers.exchange.isAllowedValidatorAsync(signerAddress, validatorAddress); - expect(isAllowed).to.be.false(); - }); - }); - describe('#setSignatureValidatorApproval', () => { - it('should set signature validator approval', async () => { - const validatorAddress = constants.NULL_ADDRESS; - const isApproved = true; - const senderAddress = makerAddress; - txHash = await contractWrappers.exchange.setSignatureValidatorApprovalAsync( - validatorAddress, - isApproved, - senderAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - }); - }); - describe('#isTransactionExecutedAsync', () => { - it('should check if the transaction is executed', async () => { - const transactionHash = '0x0000000000000000000000000000000000000000000000000000000000000000'; - const isExecuted = await contractWrappers.exchange.isTransactionExecutedAsync(transactionHash); - expect(isExecuted).to.be.false(); - }); - }); - describe('#getAssetProxyBySignatureAsync', () => { - it('should fill or kill a valid order', async () => { - const erc20ProxyId = await contractWrappers.erc20Proxy.getProxyIdAsync(); - const erc20ProxyAddressById = await contractWrappers.exchange.getAssetProxyBySignatureAsync(erc20ProxyId); - const erc20ProxyAddress = contractWrappers.erc20Proxy.address; - expect(erc20ProxyAddressById).to.be.equal(erc20ProxyAddress); - const erc721ProxyId = await contractWrappers.erc721Proxy.getProxyIdAsync(); - const erc721ProxyAddressById = await contractWrappers.exchange.getAssetProxyBySignatureAsync(erc721ProxyId); - const erc721ProxyAddress = contractWrappers.erc721Proxy.address; - expect(erc721ProxyAddressById).to.be.equal(erc721ProxyAddress); - }); - }); - describe('#preSignAsync/isPreSignedAsync', () => { - it('should preSign the hash', async () => { - const senderAddress = takerAddress; - const hash = orderHashUtils.getOrderHashHex(signedOrder); - const signerAddress = signedOrder.makerAddress; - let isPreSigned = await contractWrappers.exchange.isPreSignedAsync(hash, signerAddress); - expect(isPreSigned).to.be.false(); - txHash = await contractWrappers.exchange.preSignAsync( - hash, - signerAddress, - signedOrder.signature, - senderAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - isPreSigned = await contractWrappers.exchange.isPreSignedAsync(hash, signerAddress); - expect(isPreSigned).to.be.true(); - }); - }); - describe('#getVersionAsync', () => { - it('should return version the hash', async () => { - const version = await contractWrappers.exchange.getVersionAsync(); - const VERSION = '2.0.0'; - expect(version).to.be.equal(VERSION); - }); - }); - describe('#subscribe', () => { - const indexFilterValues = {}; - const takerTokenFillAmountInBaseUnits = new BigNumber(1); - beforeEach(async () => { - signedOrder = await fillScenarios.createFillableSignedOrderAsync( - makerAssetData, - takerAssetData, - makerAddress, - takerAddress, - fillableAmount, - ); - }); - afterEach(async () => { - contractWrappers.exchange.unsubscribeAll(); - }); - // Hack: Mocha does not allow a test to be both async and have a `done` callback - // Since we need to await the receipt of the event in the `subscribe` callback, - // we do need both. A hack is to make the top-level a sync fn w/ a done callback and then - // wrap the rest of the test in an async block - // Source: https://github.com/mochajs/mocha/issues/2407 - it('Should receive the Fill event when an order is filled', (done: DoneCallback) => { - (async () => { - const callback = callbackErrorReporter.reportNodeCallbackErrors(done)( - (logEvent: DecodedLogEvent) => { - expect(logEvent.log.event).to.be.equal(ExchangeEvents.Fill); - }, - ); - contractWrappers.exchange.subscribe(ExchangeEvents.Fill, indexFilterValues, callback); - await contractWrappers.exchange.fillOrderAsync( - signedOrder, - takerTokenFillAmountInBaseUnits, - takerAddress, - ); - })().catch(done); - }); - it('Should receive the LogCancel event when an order is cancelled', (done: DoneCallback) => { - (async () => { - const callback = callbackErrorReporter.reportNodeCallbackErrors(done)( - (logEvent: DecodedLogEvent) => { - expect(logEvent.log.event).to.be.equal(ExchangeEvents.Cancel); - }, - ); - contractWrappers.exchange.subscribe(ExchangeEvents.Cancel, indexFilterValues, callback); - await contractWrappers.exchange.cancelOrderAsync(signedOrder); - })().catch(done); - }); - it('Outstanding subscriptions are cancelled when contractWrappers.unsubscribeAll called', (done: DoneCallback) => { - (async () => { - const callbackNeverToBeCalled = callbackErrorReporter.reportNodeCallbackErrors(done)( - (logEvent: DecodedLogEvent) => { - done(new Error('Expected this subscription to have been cancelled')); - }, - ); - contractWrappers.exchange.subscribe(ExchangeEvents.Fill, indexFilterValues, callbackNeverToBeCalled); - - contractWrappers.unsubscribeAll(); - - const callback = callbackErrorReporter.reportNodeCallbackErrors(done)( - (logEvent: DecodedLogEvent) => { - expect(logEvent.log.event).to.be.equal(ExchangeEvents.Fill); - }, - ); - contractWrappers.exchange.subscribe(ExchangeEvents.Fill, indexFilterValues, callback); - await contractWrappers.exchange.fillOrderAsync( - signedOrder, - takerTokenFillAmountInBaseUnits, - takerAddress, - ); - })().catch(done); - }); - it('Should cancel subscription when unsubscribe called', (done: DoneCallback) => { - (async () => { - const callbackNeverToBeCalled = callbackErrorReporter.reportNodeCallbackErrors(done)( - (_logEvent: DecodedLogEvent) => { - done(new Error('Expected this subscription to have been cancelled')); - }, - ); - const subscriptionToken = contractWrappers.exchange.subscribe( - ExchangeEvents.Fill, - indexFilterValues, - callbackNeverToBeCalled, - ); - contractWrappers.exchange.unsubscribe(subscriptionToken); - await contractWrappers.exchange.fillOrderAsync( - signedOrder, - takerTokenFillAmountInBaseUnits, - takerAddress, - ); - done(); - })().catch(done); - }); - }); - describe('#getLogsAsync', () => { - const blockRange = { - fromBlock: 0, - toBlock: BlockParamLiteral.Latest, - }; - it('should get logs with decoded args emitted by Fill', async () => { - txHash = await contractWrappers.exchange.fillOrderAsync(signedOrder, takerTokenFillAmount, takerAddress); - const eventName = ExchangeEvents.Fill; - const indexFilterValues = {}; - const logs = await contractWrappers.exchange.getLogsAsync(eventName, blockRange, indexFilterValues); - expect(logs).to.have.length(1); - expect(logs[0].event).to.be.equal(eventName); - }); - it('should only get the logs with the correct event name', async () => { - txHash = await contractWrappers.exchange.fillOrderAsync(signedOrder, takerTokenFillAmount, takerAddress); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const differentEventName = ExchangeEvents.Cancel; - const indexFilterValues = {}; - const logs = await contractWrappers.exchange.getLogsAsync( - differentEventName, - blockRange, - indexFilterValues, - ); - expect(logs).to.have.length(0); - }); - it('should only get the logs with the correct indexed fields', async () => { - txHash = await contractWrappers.exchange.fillOrderAsync(signedOrder, takerTokenFillAmount, takerAddress); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const signedOrderWithAnotherMakerAddress = await fillScenarios.createFillableSignedOrderAsync( - makerAssetData, - takerAssetData, - anotherMakerAddress, - takerAddress, - fillableAmount, - ); - txHash = await contractWrappers.exchange.fillOrderAsync( - signedOrderWithAnotherMakerAddress, - takerTokenFillAmount, - takerAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - - const eventName = ExchangeEvents.Fill; - const indexFilterValues = { - makerAddress: anotherMakerAddress, - }; - const logs = await contractWrappers.exchange.getLogsAsync( - eventName, - blockRange, - indexFilterValues, - ); - expect(logs).to.have.length(1); - const args = logs[0].args; - expect(args.makerAddress).to.be.equal(anotherMakerAddress); - }); - }); -}); // tslint:disable:max-file-line-count diff --git a/packages/contract-wrappers/test/forwarder_wrapper_test.ts b/packages/contract-wrappers/test/forwarder_wrapper_test.ts deleted file mode 100644 index 0d197eced..000000000 --- a/packages/contract-wrappers/test/forwarder_wrapper_test.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { BlockchainLifecycle } from '@0x/dev-utils'; -import { FillScenarios } from '@0x/fill-scenarios'; -import { assetDataUtils } from '@0x/order-utils'; -import { SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import * as chai from 'chai'; -import 'mocha'; - -import { ContractWrappers, OrderStatus } from '../src'; - -import { chaiSetup } from './utils/chai_setup'; -import { constants } from './utils/constants'; -import { migrateOnceAsync } from './utils/migrate'; -import { tokenUtils } from './utils/token_utils'; -import { provider, web3Wrapper } from './utils/web3_wrapper'; - -chaiSetup.configure(); -const expect = chai.expect; -const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); - -// tslint:disable:custom-no-magic-numbers -describe('ForwarderWrapper', () => { - const fillableAmount = new BigNumber(5); - let contractWrappers: ContractWrappers; - let fillScenarios: FillScenarios; - let exchangeContractAddress: string; - let zrxTokenAddress: string; - let userAddresses: string[]; - let makerAddress: string; - let takerAddress: string; - let makerTokenAddress: string; - let takerTokenAddress: string; - let makerAssetData: string; - let takerAssetData: string; - let signedOrder: SignedOrder; - let anotherSignedOrder: SignedOrder; - before(async () => { - const contractAddresses = await migrateOnceAsync(); - await blockchainLifecycle.startAsync(); - const config = { - networkId: constants.TESTRPC_NETWORK_ID, - contractAddresses, - blockPollingIntervalMs: 10, - }; - contractWrappers = new ContractWrappers(provider, config); - exchangeContractAddress = contractWrappers.exchange.address; - userAddresses = await web3Wrapper.getAvailableAddressesAsync(); - zrxTokenAddress = contractWrappers.exchange.zrxTokenAddress; - fillScenarios = new FillScenarios( - provider, - userAddresses, - zrxTokenAddress, - exchangeContractAddress, - contractWrappers.erc20Proxy.address, - contractWrappers.erc721Proxy.address, - ); - [, makerAddress, takerAddress] = userAddresses; - [makerTokenAddress] = tokenUtils.getDummyERC20TokenAddresses(); - takerTokenAddress = contractWrappers.forwarder.etherTokenAddress; - [makerAssetData, takerAssetData] = [ - assetDataUtils.encodeERC20AssetData(makerTokenAddress), - assetDataUtils.encodeERC20AssetData(takerTokenAddress), - ]; - signedOrder = await fillScenarios.createFillableSignedOrderAsync( - makerAssetData, - takerAssetData, - makerAddress, - constants.NULL_ADDRESS, - fillableAmount, - ); - anotherSignedOrder = await fillScenarios.createFillableSignedOrderAsync( - makerAssetData, - takerAssetData, - makerAddress, - constants.NULL_ADDRESS, - fillableAmount, - ); - }); - after(async () => { - await blockchainLifecycle.revertAsync(); - }); - beforeEach(async () => { - await blockchainLifecycle.startAsync(); - }); - afterEach(async () => { - await blockchainLifecycle.revertAsync(); - }); - describe('#marketBuyOrdersWithEthAsync', () => { - it('should market buy orders with eth', async () => { - const signedOrders = [signedOrder, anotherSignedOrder]; - const makerAssetFillAmount = signedOrder.makerAssetAmount.plus(anotherSignedOrder.makerAssetAmount); - const txHash = await contractWrappers.forwarder.marketBuyOrdersWithEthAsync( - signedOrders, - makerAssetFillAmount, - takerAddress, - makerAssetFillAmount, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const ordersInfo = await contractWrappers.exchange.getOrdersInfoAsync([signedOrder, anotherSignedOrder]); - expect(ordersInfo[0].orderStatus).to.be.equal(OrderStatus.FullyFilled); - expect(ordersInfo[1].orderStatus).to.be.equal(OrderStatus.FullyFilled); - }); - it('should throw when invalid transaction and shouldValidate is true', async () => { - const signedOrders = [signedOrder]; - // request more makerAsset than what is available - const makerAssetFillAmount = signedOrder.makerAssetAmount.plus(100); - return expect( - contractWrappers.forwarder.marketBuyOrdersWithEthAsync( - signedOrders, - makerAssetFillAmount, - takerAddress, - makerAssetFillAmount, - [], - 0, - constants.NULL_ADDRESS, - { - shouldValidate: true, - }, - ), - ).to.be.rejectedWith('COMPLETE_FILL_FAILED'); - }); - }); - describe('#marketSellOrdersWithEthAsync', () => { - it('should market sell orders with eth', async () => { - const signedOrders = [signedOrder, anotherSignedOrder]; - const makerAssetFillAmount = signedOrder.makerAssetAmount.plus(anotherSignedOrder.makerAssetAmount); - const txHash = await contractWrappers.forwarder.marketSellOrdersWithEthAsync( - signedOrders, - takerAddress, - makerAssetFillAmount, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - const ordersInfo = await contractWrappers.exchange.getOrdersInfoAsync([signedOrder, anotherSignedOrder]); - expect(ordersInfo[0].orderStatus).to.be.equal(OrderStatus.FullyFilled); - expect(ordersInfo[1].orderStatus).to.be.equal(OrderStatus.Fillable); - expect(ordersInfo[1].orderTakerAssetFilledAmount).to.be.bignumber.equal(new BigNumber(4)); // only 95% of ETH is sold - }); - it('should throw when invalid transaction and shouldValidate is true', async () => { - // create an order with fees, we try to fill it but we do not provide enough ETH to cover the fees - const signedOrderWithFee = await fillScenarios.createFillableSignedOrderWithFeesAsync( - makerAssetData, - takerAssetData, - constants.ZERO_AMOUNT, - new BigNumber(100), - makerAddress, - constants.NULL_ADDRESS, - fillableAmount, - constants.NULL_ADDRESS, - ); - const signedOrders = [signedOrderWithFee]; - const makerAssetFillAmount = signedOrder.makerAssetAmount; - return expect( - contractWrappers.forwarder.marketSellOrdersWithEthAsync( - signedOrders, - takerAddress, - makerAssetFillAmount, - [], - 0, - constants.NULL_ADDRESS, - { - shouldValidate: true, - }, - ), - ).to.be.rejectedWith('COMPLETE_FILL_FAILED'); - }); - }); -}); diff --git a/packages/contract-wrappers/test/global_hooks.ts b/packages/contract-wrappers/test/global_hooks.ts deleted file mode 100644 index e23739b59..000000000 --- a/packages/contract-wrappers/test/global_hooks.ts +++ /dev/null @@ -1,6 +0,0 @@ -before('set up mocha', async function(): Promise { - // 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); // tslint:disable-line:no-invalid-this -}); diff --git a/packages/contract-wrappers/test/order_validator_wrapper_test.ts b/packages/contract-wrappers/test/order_validator_wrapper_test.ts deleted file mode 100644 index c61c05d31..000000000 --- a/packages/contract-wrappers/test/order_validator_wrapper_test.ts +++ /dev/null @@ -1,146 +0,0 @@ -import { ContractAddresses } from '@0x/contract-addresses'; -import { BlockchainLifecycle } from '@0x/dev-utils'; -import { FillScenarios } from '@0x/fill-scenarios'; -import { assetDataUtils } from '@0x/order-utils'; -import { SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import * as chai from 'chai'; -import * as _ from 'lodash'; -import 'mocha'; - -import { ContractWrappers, OrderStatus } from '../src'; -import { OrderInfo, TraderInfo } from '../src/types'; - -import { chaiSetup } from './utils/chai_setup'; -import { constants } from './utils/constants'; -import { migrateOnceAsync } from './utils/migrate'; -import { tokenUtils } from './utils/token_utils'; -import { provider, web3Wrapper } from './utils/web3_wrapper'; - -chaiSetup.configure(); -const expect = chai.expect; -const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); - -describe('OrderValidator', () => { - const fillableAmount = new BigNumber(5); - let contractWrappers: ContractWrappers; - let fillScenarios: FillScenarios; - let exchangeContractAddress: string; - let zrxTokenAddress: string; - let zrxTokenAssetData: string; - let userAddresses: string[]; - let coinbase: string; - let makerAddress: string; - let takerAddress: string; - let feeRecipient: string; - let anotherMakerAddress: string; - let makerTokenAddress: string; - let takerTokenAddress: string; - let makerAssetData: string; - let takerAssetData: string; - let signedOrder: SignedOrder; - let anotherSignedOrder: SignedOrder; - let contractAddresses: ContractAddresses; - - before(async () => { - contractAddresses = await migrateOnceAsync(); - await blockchainLifecycle.startAsync(); - const config = { - networkId: constants.TESTRPC_NETWORK_ID, - contractAddresses, - blockPollingIntervalMs: 10, - }; - contractWrappers = new ContractWrappers(provider, config); - exchangeContractAddress = contractWrappers.exchange.address; - userAddresses = await web3Wrapper.getAvailableAddressesAsync(); - zrxTokenAddress = contractWrappers.exchange.zrxTokenAddress; - zrxTokenAssetData = assetDataUtils.encodeERC20AssetData(zrxTokenAddress); - fillScenarios = new FillScenarios( - provider, - userAddresses, - zrxTokenAddress, - exchangeContractAddress, - contractWrappers.erc20Proxy.address, - contractWrappers.erc721Proxy.address, - ); - [coinbase, makerAddress, takerAddress, feeRecipient, anotherMakerAddress] = userAddresses; - [makerTokenAddress] = tokenUtils.getDummyERC20TokenAddresses(); - takerTokenAddress = contractAddresses.etherToken; - [makerAssetData, takerAssetData] = [ - assetDataUtils.encodeERC20AssetData(makerTokenAddress), - assetDataUtils.encodeERC20AssetData(takerTokenAddress), - ]; - - signedOrder = await fillScenarios.createFillableSignedOrderAsync( - makerAssetData, - takerAssetData, - makerAddress, - constants.NULL_ADDRESS, - fillableAmount, - ); - anotherSignedOrder = await fillScenarios.createFillableSignedOrderAsync( - zrxTokenAssetData, - takerAssetData, - makerAddress, - constants.NULL_ADDRESS, - fillableAmount, - ); - }); - after(async () => { - await blockchainLifecycle.revertAsync(); - }); - beforeEach(async () => { - await blockchainLifecycle.startAsync(); - }); - afterEach(async () => { - await blockchainLifecycle.revertAsync(); - }); - describe('#getOrdersAndTradersInfoAsync', () => { - let signedOrders: SignedOrder[]; - let takerAddresses: string[]; - let ordersInfo: OrderInfo[]; - let tradersInfo: TraderInfo[]; - beforeEach(async () => { - signedOrders = [signedOrder, anotherSignedOrder]; - takerAddresses = [takerAddress, takerAddress]; - const ordersAndTradersInfo = await contractWrappers.orderValidator.getOrdersAndTradersInfoAsync( - signedOrders, - takerAddresses, - ); - ordersInfo = _.map(ordersAndTradersInfo, orderAndTraderInfo => orderAndTraderInfo.orderInfo); - tradersInfo = _.map(ordersAndTradersInfo, orderAndTraderInfo => orderAndTraderInfo.traderInfo); - }); - it('should return the same number of order infos and trader infos as input orders', async () => { - expect(ordersInfo.length).to.be.equal(signedOrders.length); - expect(tradersInfo.length).to.be.equal(takerAddresses.length); - }); - it('should return correct on-chain order info for input orders', async () => { - const firstOrderInfo = ordersInfo[0]; - const secondOrderInfo = ordersInfo[1]; - expect(firstOrderInfo.orderStatus).to.be.equal(OrderStatus.Fillable); - expect(firstOrderInfo.orderTakerAssetFilledAmount).to.bignumber.equal(constants.ZERO_AMOUNT); - expect(secondOrderInfo.orderStatus).to.be.equal(OrderStatus.Fillable); - expect(secondOrderInfo.orderTakerAssetFilledAmount).to.bignumber.equal(constants.ZERO_AMOUNT); - }); - it('should return correct on-chain trader info for input takers', async () => { - const firstTraderInfo = tradersInfo[0]; - const secondTraderInfo = tradersInfo[1]; - expect(firstTraderInfo.makerBalance).to.bignumber.equal(new BigNumber(5)); - expect(firstTraderInfo.makerAllowance).to.bignumber.equal(new BigNumber(5)); - expect(firstTraderInfo.takerBalance).to.bignumber.equal(new BigNumber(0)); - expect(firstTraderInfo.takerAllowance).to.bignumber.equal(new BigNumber(0)); - expect(firstTraderInfo.makerZrxBalance).to.bignumber.equal(new BigNumber(5)); - expect(firstTraderInfo.makerZrxAllowance).to.bignumber.equal(new BigNumber(5)); - expect(firstTraderInfo.takerZrxBalance).to.bignumber.equal(new BigNumber(0)); - expect(firstTraderInfo.takerZrxAllowance).to.bignumber.equal(new BigNumber(0)); - expect(secondTraderInfo.makerBalance).to.bignumber.equal(new BigNumber(5)); - expect(secondTraderInfo.makerAllowance).to.bignumber.equal(new BigNumber(5)); - expect(secondTraderInfo.takerBalance).to.bignumber.equal(new BigNumber(0)); - expect(secondTraderInfo.takerAllowance).to.bignumber.equal(new BigNumber(0)); - expect(secondTraderInfo.makerZrxBalance).to.bignumber.equal(new BigNumber(5)); - expect(secondTraderInfo.makerZrxAllowance).to.bignumber.equal(new BigNumber(5)); - expect(secondTraderInfo.takerZrxBalance).to.bignumber.equal(new BigNumber(0)); - expect(secondTraderInfo.takerZrxAllowance).to.bignumber.equal(new BigNumber(0)); - }); - }); -}); diff --git a/packages/contract-wrappers/test/revert_validation_test.ts b/packages/contract-wrappers/test/revert_validation_test.ts deleted file mode 100644 index efd5dd61f..000000000 --- a/packages/contract-wrappers/test/revert_validation_test.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { BlockchainLifecycle, devConstants, web3Factory } from '@0x/dev-utils'; -import { FillScenarios } from '@0x/fill-scenarios'; -import { runMigrationsAsync } from '@0x/migrations'; -import { assetDataUtils } from '@0x/order-utils'; -import { SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as chai from 'chai'; -import 'mocha'; - -import { ContractWrappers } from '../src'; - -import { chaiSetup } from './utils/chai_setup'; -import { constants } from './utils/constants'; -import { tokenUtils } from './utils/token_utils'; - -chaiSetup.configure(); -const expect = chai.expect; - -describe('Revert Validation ExchangeWrapper', () => { - let contractWrappers: ContractWrappers; - let userAddresses: string[]; - let fillScenarios: FillScenarios; - let makerTokenAddress: string; - let takerTokenAddress: string; - let makerAddress: string; - let takerAddress: string; - let makerAssetData: string; - let takerAssetData: string; - let txHash: string; - let blockchainLifecycle: BlockchainLifecycle; - let web3Wrapper: Web3Wrapper; - const fillableAmount = new BigNumber(5); - const takerTokenFillAmount = new BigNumber(5); - let signedOrder: SignedOrder; - before(async () => { - // vmErrorsOnRPCResponse is useful for quick feedback and testing during development - // but is not the default behaviour in production. Here we ensure our failure cases - // are handled in an environment which behaves similar to production - const provider = web3Factory.getRpcProvider({ - shouldUseInProcessGanache: true, - shouldThrowErrorsOnGanacheRPCResponse: false, - }); - web3Wrapper = new Web3Wrapper(provider); - blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); - // Re-deploy the artifacts in this provider, rather than in the default provider exposed in - // the beforeAll hook. This is due to the fact that the default provider enabled vmErrorsOnRPCResponse - // and we are explicity testing with vmErrorsOnRPCResponse disabled. - const txDefaults = { - gas: devConstants.GAS_LIMIT, - from: devConstants.TESTRPC_FIRST_ADDRESS, - }; - await blockchainLifecycle.startAsync(); - const contractAddresses = await runMigrationsAsync(provider, txDefaults); - const config = { - networkId: constants.TESTRPC_NETWORK_ID, - contractAddresses, - blockPollingIntervalMs: 10, - }; - contractWrappers = new ContractWrappers(provider, config); - userAddresses = await web3Wrapper.getAvailableAddressesAsync(); - fillScenarios = new FillScenarios( - provider, - userAddresses, - contractAddresses.zrxToken, - contractAddresses.exchange, - contractAddresses.erc20Proxy, - contractAddresses.erc721Proxy, - ); - [, makerAddress, takerAddress] = userAddresses; - [makerTokenAddress, takerTokenAddress] = tokenUtils.getDummyERC20TokenAddresses(); - [makerAssetData, takerAssetData] = [ - assetDataUtils.encodeERC20AssetData(makerTokenAddress), - assetDataUtils.encodeERC20AssetData(takerTokenAddress), - ]; - signedOrder = await fillScenarios.createFillableSignedOrderAsync( - makerAssetData, - takerAssetData, - makerAddress, - takerAddress, - fillableAmount, - ); - }); - after(async () => { - await blockchainLifecycle.revertAsync(); - }); - beforeEach(async () => { - await blockchainLifecycle.startAsync(); - }); - afterEach(async () => { - await blockchainLifecycle.revertAsync(); - }); - describe('#fillOrderAsync', () => { - it('should throw the revert reason when shouldValidate is true and a fill would revert', async () => { - // Create a scenario where the fill will revert - const makerTokenBalance = await contractWrappers.erc20Token.getBalanceAsync( - makerTokenAddress, - makerAddress, - ); - // Transfer all of the tokens from maker to create a failure scenario - txHash = await contractWrappers.erc20Token.transferAsync( - makerTokenAddress, - makerAddress, - takerAddress, - makerTokenBalance, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - return expect( - contractWrappers.exchange.fillOrderAsync(signedOrder, takerTokenFillAmount, takerAddress, { - shouldValidate: true, - }), - ).to.be.rejectedWith('TRANSFER_FAILED'); - }); - }); -}); diff --git a/packages/contract-wrappers/test/subscription_test.ts b/packages/contract-wrappers/test/subscription_test.ts deleted file mode 100644 index 0fa6af40d..000000000 --- a/packages/contract-wrappers/test/subscription_test.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { BlockchainLifecycle } from '@0x/dev-utils'; -import { DoneCallback } from '@0x/types'; -import * as _ from 'lodash'; -import 'mocha'; -import * as Sinon from 'sinon'; - -import { - ContractWrappers, - ContractWrappersConfig, - DecodedLogEvent, - ERC20TokenApprovalEventArgs, - ERC20TokenEvents, -} from '../src'; - -import { chaiSetup } from './utils/chai_setup'; -import { constants } from './utils/constants'; -import { migrateOnceAsync } from './utils/migrate'; -import { tokenUtils } from './utils/token_utils'; -import { provider, web3Wrapper } from './utils/web3_wrapper'; - -chaiSetup.configure(); -const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); - -describe('SubscriptionTest', () => { - let contractWrappers: ContractWrappers; - let config: ContractWrappersConfig; - - before(async () => { - const contractAddresses = await migrateOnceAsync(); - config = { - networkId: constants.TESTRPC_NETWORK_ID, - contractAddresses, - }; - contractWrappers = new ContractWrappers(provider, config); - }); - beforeEach(async () => { - await blockchainLifecycle.startAsync(); - }); - afterEach(async () => { - await blockchainLifecycle.revertAsync(); - }); - describe('#subscribe', () => { - const indexFilterValues = {}; - let tokenAddress: string; - let stubs: Sinon.SinonStub[] = []; - before(() => { - const tokenAddresses = tokenUtils.getDummyERC20TokenAddresses(); - tokenAddress = tokenAddresses[0]; - }); - afterEach(() => { - contractWrappers.erc20Token.unsubscribeAll(); - _.each(stubs, s => s.restore()); - stubs = []; - }); - it('Should allow unsubscribeAll to be called successfully after an error', (done: DoneCallback) => { - (async () => { - const callback = (err: Error | null, _logEvent?: DecodedLogEvent) => - _.noop.bind(_); - contractWrappers.erc20Token.subscribe( - tokenAddress, - ERC20TokenEvents.Approval, - indexFilterValues, - callback, - ); - stubs = [ - Sinon.stub((contractWrappers as any)._web3Wrapper, 'getBlockIfExistsAsync').throws( - new Error('JSON RPC error'), - ), - ]; - contractWrappers.erc20Token.unsubscribeAll(); - done(); - })().catch(done); - }); - }); -}); diff --git a/packages/contract-wrappers/test/transaction_encoder_test.ts b/packages/contract-wrappers/test/transaction_encoder_test.ts deleted file mode 100644 index ef9eb2cf3..000000000 --- a/packages/contract-wrappers/test/transaction_encoder_test.ts +++ /dev/null @@ -1,210 +0,0 @@ -import { BlockchainLifecycle } from '@0x/dev-utils'; -import { FillScenarios } from '@0x/fill-scenarios'; -import { assetDataUtils, generatePseudoRandomSalt, orderHashUtils, signatureUtils } from '@0x/order-utils'; -import { SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import 'mocha'; - -import { ContractWrappers } from '../src'; -import { TransactionEncoder } from '../src/utils/transaction_encoder'; - -import { constants } from './utils/constants'; -import { migrateOnceAsync } from './utils/migrate'; -import { tokenUtils } from './utils/token_utils'; -import { provider, web3Wrapper } from './utils/web3_wrapper'; - -const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); - -describe('TransactionEncoder', () => { - let contractWrappers: ContractWrappers; - let userAddresses: string[]; - let fillScenarios: FillScenarios; - let exchangeContractAddress: string; - let makerTokenAddress: string; - let takerTokenAddress: string; - let coinbase: string; - let makerAddress: string; - let senderAddress: string; - let takerAddress: string; - let makerAssetData: string; - let takerAssetData: string; - let txHash: string; - const fillableAmount = new BigNumber(5); - const takerTokenFillAmount = new BigNumber(5); - let signedOrder: SignedOrder; - - before(async () => { - const contractAddresses = await migrateOnceAsync(); - await blockchainLifecycle.startAsync(); - const config = { - networkId: constants.TESTRPC_NETWORK_ID, - contractAddresses, - blockPollingIntervalMs: 10, - }; - contractWrappers = new ContractWrappers(provider, config); - exchangeContractAddress = contractWrappers.exchange.address; - userAddresses = await web3Wrapper.getAvailableAddressesAsync(); - const zrxTokenAddress = contractWrappers.exchange.zrxTokenAddress; - fillScenarios = new FillScenarios( - provider, - userAddresses, - zrxTokenAddress, - exchangeContractAddress, - contractWrappers.erc20Proxy.address, - contractWrappers.erc721Proxy.address, - ); - [coinbase, makerAddress, takerAddress, senderAddress] = userAddresses; - [makerTokenAddress, takerTokenAddress] = tokenUtils.getDummyERC20TokenAddresses(); - [makerAssetData, takerAssetData] = [ - assetDataUtils.encodeERC20AssetData(makerTokenAddress), - assetDataUtils.encodeERC20AssetData(takerTokenAddress), - ]; - signedOrder = await fillScenarios.createFillableSignedOrderAsync( - makerAssetData, - takerAssetData, - makerAddress, - takerAddress, - fillableAmount, - ); - }); - after(async () => { - await blockchainLifecycle.revertAsync(); - }); - beforeEach(async () => { - await blockchainLifecycle.startAsync(); - }); - afterEach(async () => { - await blockchainLifecycle.revertAsync(); - }); - describe('encode and executeTransaction', () => { - const executeTransactionOrThrowAsync = async ( - encoder: TransactionEncoder, - data: string, - signerAddress: string = takerAddress, - ): Promise => { - const salt = generatePseudoRandomSalt(); - const encodedTransaction = encoder.getTransactionHex(data, salt, signerAddress); - const signature = await signatureUtils.ecSignHashAsync(provider, encodedTransaction, signerAddress); - txHash = await contractWrappers.exchange.executeTransactionAsync( - salt, - signerAddress, - data, - signature, - senderAddress, - ); - await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - }; - describe('#fillOrderTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const data = encoder.fillOrderTx(signedOrder, takerTokenFillAmount); - await executeTransactionOrThrowAsync(encoder, data); - }); - }); - describe('#fillOrderNoThrowTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const data = encoder.fillOrderNoThrowTx(signedOrder, takerTokenFillAmount); - await executeTransactionOrThrowAsync(encoder, data); - }); - }); - describe('#fillOrKillOrderTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const data = encoder.fillOrKillOrderTx(signedOrder, takerTokenFillAmount); - await executeTransactionOrThrowAsync(encoder, data); - }); - }); - describe('#marketSellOrdersTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const data = encoder.marketSellOrdersTx([signedOrder], takerTokenFillAmount); - await executeTransactionOrThrowAsync(encoder, data); - }); - }); - describe('#marketSellOrdersNoThrowTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const data = encoder.marketSellOrdersNoThrowTx([signedOrder], takerTokenFillAmount); - await executeTransactionOrThrowAsync(encoder, data); - }); - }); - describe('#marketBuyOrdersTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const data = encoder.marketBuyOrdersTx([signedOrder], fillableAmount); - await executeTransactionOrThrowAsync(encoder, data); - }); - }); - describe('#marketBuyOrdersNoThrowTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const data = encoder.marketBuyOrdersNoThrowTx([signedOrder], fillableAmount); - await executeTransactionOrThrowAsync(encoder, data); - }); - }); - describe('#preSignTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const orderHash = orderHashUtils.getOrderHashHex(signedOrder); - const signature = signedOrder.signature; - const data = encoder.preSignTx(orderHash, makerAddress, signature); - await executeTransactionOrThrowAsync(encoder, data); - }); - }); - describe('#setSignatureValidatorApprovalTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const isApproved = true; - const data = encoder.setSignatureValidatorApprovalTx(senderAddress, isApproved); - await executeTransactionOrThrowAsync(encoder, data); - }); - }); - describe('#batchFillOrdersTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const data = encoder.batchFillOrdersTx([signedOrder], [takerTokenFillAmount]); - await executeTransactionOrThrowAsync(encoder, data); - }); - }); - describe('#batchFillOrKillOrdersTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const data = encoder.batchFillOrKillOrdersTx([signedOrder], [takerTokenFillAmount]); - await executeTransactionOrThrowAsync(encoder, data); - }); - }); - describe('#batchFillOrdersNoThrowTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const data = encoder.batchFillOrdersNoThrowTx([signedOrder], [takerTokenFillAmount]); - await executeTransactionOrThrowAsync(encoder, data); - }); - }); - describe('#batchCancelOrdersTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const data = encoder.batchCancelOrdersTx([signedOrder]); - const signerAddress = makerAddress; - await executeTransactionOrThrowAsync(encoder, data, signerAddress); - }); - }); - describe('#cancelOrderTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const data = encoder.cancelOrderTx(signedOrder); - const signerAddress = makerAddress; - await executeTransactionOrThrowAsync(encoder, data, signerAddress); - }); - }); - describe('#cancelOrdersUpToTx', () => { - it('should successfully execute the transaction', async () => { - const encoder = await contractWrappers.exchange.transactionEncoderAsync(); - const targetEpoch = signedOrder.salt; - const data = encoder.cancelOrdersUpToTx(targetEpoch); - const signerAddress = makerAddress; - await executeTransactionOrThrowAsync(encoder, data, signerAddress); - }); - }); - }); -}); diff --git a/packages/contract-wrappers/test/utils/chai_setup.ts b/packages/contract-wrappers/test/utils/chai_setup.ts deleted file mode 100644 index 1a8733093..000000000 --- a/packages/contract-wrappers/test/utils/chai_setup.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as chai from 'chai'; -import chaiAsPromised = require('chai-as-promised'); -import ChaiBigNumber = require('chai-bignumber'); -import * as dirtyChai from 'dirty-chai'; - -export const chaiSetup = { - configure(): void { - chai.config.includeStack = true; - chai.use(ChaiBigNumber()); - chai.use(dirtyChai); - chai.use(chaiAsPromised); - }, -}; diff --git a/packages/contract-wrappers/test/utils/constants.ts b/packages/contract-wrappers/test/utils/constants.ts deleted file mode 100644 index ca6c574e4..000000000 --- a/packages/contract-wrappers/test/utils/constants.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { BigNumber } from '@0x/utils'; - -export const constants = { - NULL_ADDRESS: '0x0000000000000000000000000000000000000000', - ROPSTEN_NETWORK_ID: 3, - KOVAN_NETWORK_ID: 42, - TESTRPC_NETWORK_ID: 50, - AWAIT_TRANSACTION_MINED_MS: 0, - KOVAN_RPC_URL: 'https://kovan.infura.io/', - ROPSTEN_RPC_URL: 'https://ropsten.infura.io/', - ZRX_DECIMALS: 18, - DUMMY_TOKEN_NAME: '', - DUMMY_TOKEN_SYMBOL: '', - DUMMY_TOKEN_DECIMALS: 18, - DUMMY_TOKEN_TOTAL_SUPPLY: new BigNumber(10 ** 27), // tslint:disable-line:custom-no-magic-numbers - NUM_DUMMY_ERC20_TO_DEPLOY: 3, - NUM_DUMMY_ERC721_TO_DEPLOY: 1, - ZERO_AMOUNT: new BigNumber(0), -}; diff --git a/packages/contract-wrappers/test/utils/dutch_auction_utils.ts b/packages/contract-wrappers/test/utils/dutch_auction_utils.ts deleted file mode 100644 index 8e2aef217..000000000 --- a/packages/contract-wrappers/test/utils/dutch_auction_utils.ts +++ /dev/null @@ -1,153 +0,0 @@ -import { DummyERC20TokenContract } from '@0x/abi-gen-wrappers'; -import * as artifacts from '@0x/contract-artifacts'; -import { assetDataUtils } from '@0x/order-utils'; -import { orderFactory } from '@0x/order-utils/lib/src/order_factory'; -import { SignedOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; - -import { DutchAuctionWrapper } from '../../src/contract_wrappers/dutch_auction_wrapper'; - -import { constants } from './constants'; - -export class DutchAuctionUtils { - private readonly _web3Wrapper: Web3Wrapper; - private readonly _coinbase: string; - private readonly _exchangeAddress: string; - private readonly _erc20ProxyAddress: string; - - constructor(web3Wrapper: Web3Wrapper, coinbase: string, exchangeAddress: string, erc20ProxyAddress: string) { - this._web3Wrapper = web3Wrapper; - this._coinbase = coinbase; - this._exchangeAddress = exchangeAddress; - this._erc20ProxyAddress = erc20ProxyAddress; - } - public async createSignedSellOrderAsync( - auctionBeginTimeSections: BigNumber, - acutionEndTimeSeconds: BigNumber, - auctionBeginTakerAssetAmount: BigNumber, - auctionEndTakerAssetAmount: BigNumber, - makerAssetAmount: BigNumber, - makerAssetData: string, - takerAssetData: string, - makerAddress: string, - takerAddress: string, - senderAddress?: string, - makerFee?: BigNumber, - takerFee?: BigNumber, - feeRecipientAddress?: string, - ): Promise { - // Notes on sell order: - // - The `takerAssetAmount` is set to the `auctionEndTakerAssetAmount`, which is the lowest amount the - // the seller can expect to receive - // - The `makerAssetData` is overloaded to include the auction begin time and begin taker asset amount - const makerAssetDataWithAuctionDetails = DutchAuctionWrapper.encodeDutchAuctionAssetData( - makerAssetData, - auctionBeginTimeSections, - auctionBeginTakerAssetAmount, - ); - const signedOrder = await orderFactory.createSignedOrderAsync( - this._web3Wrapper.getProvider(), - makerAddress, - makerAssetAmount, - makerAssetDataWithAuctionDetails, - auctionEndTakerAssetAmount, - takerAssetData, - this._exchangeAddress, - { - takerAddress, - senderAddress, - makerFee, - takerFee, - feeRecipientAddress, - expirationTimeSeconds: acutionEndTimeSeconds, - }, - ); - const erc20AssetData = assetDataUtils.decodeERC20AssetData(makerAssetData); - await this._increaseERC20BalanceAndAllowanceAsync(erc20AssetData.tokenAddress, makerAddress, makerAssetAmount); - return signedOrder; - } - public async createSignedBuyOrderAsync( - sellOrder: SignedOrder, - buyerAddress: string, - senderAddress?: string, - makerFee?: BigNumber, - takerFee?: BigNumber, - feeRecipientAddress?: string, - expirationTimeSeconds?: BigNumber, - ): Promise { - const dutchAuctionData = DutchAuctionWrapper.decodeDutchAuctionData(sellOrder.makerAssetData); - // Notes on buy order: - // - The `makerAssetAmount` is set to `dutchAuctionData.beginAmount`, which is - // the highest amount the buyer would have to pay out at any point during the auction. - // - The `takerAssetAmount` is set to the seller's `makerAssetAmount`, as the buyer - // receives the entire amount being sold by the seller. - // - The `makerAssetData`/`takerAssetData` are reversed from the sell order - const signedOrder = await orderFactory.createSignedOrderAsync( - this._web3Wrapper.getProvider(), - buyerAddress, - dutchAuctionData.beginAmount, - sellOrder.takerAssetData, - sellOrder.makerAssetAmount, - sellOrder.makerAssetData, - sellOrder.exchangeAddress, - { - senderAddress, - makerFee, - takerFee, - feeRecipientAddress, - expirationTimeSeconds, - }, - ); - const buyerERC20AssetData = assetDataUtils.decodeERC20AssetData(sellOrder.takerAssetData); - await this._increaseERC20BalanceAndAllowanceAsync( - buyerERC20AssetData.tokenAddress, - buyerAddress, - dutchAuctionData.beginAmount, - ); - return signedOrder; - } - private async _increaseERC20BalanceAndAllowanceAsync( - tokenAddress: string, - address: string, - amount: BigNumber, - ): Promise { - if (amount.isZero() || address === constants.NULL_ADDRESS) { - return; // noop - } - await Promise.all([ - this._increaseERC20BalanceAsync(tokenAddress, address, amount), - this._increaseERC20AllowanceAsync(tokenAddress, address, amount), - ]); - } - private async _increaseERC20BalanceAsync(tokenAddress: string, address: string, amount: BigNumber): Promise { - const erc20Token = new DummyERC20TokenContract( - artifacts.DummyERC20Token.compilerOutput.abi, - tokenAddress, - this._web3Wrapper.getProvider(), - this._web3Wrapper.getContractDefaults(), - ); - const txHash = await erc20Token.transfer.sendTransactionAsync(address, amount, { - from: this._coinbase, - }); - await this._web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - } - private async _increaseERC20AllowanceAsync( - tokenAddress: string, - address: string, - amount: BigNumber, - ): Promise { - const erc20Token = new DummyERC20TokenContract( - artifacts.DummyERC20Token.compilerOutput.abi, - tokenAddress, - this._web3Wrapper.getProvider(), - this._web3Wrapper.getContractDefaults(), - ); - const oldMakerAllowance = await erc20Token.allowance.callAsync(address, this._erc20ProxyAddress); - const newMakerAllowance = oldMakerAllowance.plus(amount); - const txHash = await erc20Token.approve.sendTransactionAsync(this._erc20ProxyAddress, newMakerAllowance, { - from: address, - }); - await this._web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - } -} diff --git a/packages/contract-wrappers/test/utils/migrate.ts b/packages/contract-wrappers/test/utils/migrate.ts deleted file mode 100644 index 665ce0faa..000000000 --- a/packages/contract-wrappers/test/utils/migrate.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ContractAddresses } from '@0x/contract-addresses'; -import { devConstants } from '@0x/dev-utils'; -import { runMigrationsOnceAsync } from '@0x/migrations'; - -import { provider } from './web3_wrapper'; - -/** - * Configures and runs the migrations exactly once. Any subsequent times this is - * called, it returns the cached addresses. - * @returns The addresses of contracts that were deployed during the migrations. - */ -export async function migrateOnceAsync(): Promise { - const txDefaults = { - gas: devConstants.GAS_LIMIT, - from: devConstants.TESTRPC_FIRST_ADDRESS, - }; - return runMigrationsOnceAsync(provider, txDefaults); -} diff --git a/packages/contract-wrappers/test/utils/token_utils.ts b/packages/contract-wrappers/test/utils/token_utils.ts deleted file mode 100644 index e390d2775..000000000 --- a/packages/contract-wrappers/test/utils/token_utils.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { DummyERC721TokenContract } from '@0x/abi-gen-wrappers'; -import { DummyERC721Token } from '@0x/contract-artifacts'; -import { generatePseudoRandomSalt } from '@0x/order-utils'; -import { BigNumber } from '@0x/utils'; - -import { provider, txDefaults, web3Wrapper } from './web3_wrapper'; - -// Those addresses come from migrations. They're deterministic so it's relatively safe to hard-code them here. -// Before we were fetching them from the TokenRegistry but now we can't as it's deprecated and removed. -// TODO(albrow): Import these from the migrations package instead of hard-coding them. -const DUMMY_ERC_20_ADRESSES = [ - '0x34d402f14d58e001d8efbe6585051bf9706aa064', - '0x25b8fe1de9daf8ba351890744ff28cf7dfa8f5e3', - '0xcdb594a32b1cc3479d8746279712c39d18a07fc0', - '0x1e2f9e10d02a6b8f8f69fcbf515e75039d2ea30d', - '0xbe0037eaf2d64fe5529bca93c18c9702d3930376', -]; - -const DUMMY_ERC_721_ADRESSES = ['0x07f96aa816c1f244cbc6ef114bb2b023ba54a2eb']; - -export const tokenUtils = { - getDummyERC20TokenAddresses(): string[] { - return DUMMY_ERC_20_ADRESSES; - }, - getDummyERC721TokenAddresses(): string[] { - return DUMMY_ERC_721_ADRESSES; - }, - async mintDummyERC721Async(address: string, tokenOwner: string): Promise { - const erc721 = new DummyERC721TokenContract(DummyERC721Token.compilerOutput.abi, address, provider, txDefaults); - const tokenId = generatePseudoRandomSalt(); - const txHash = await erc721.mint.sendTransactionAsync(tokenOwner, tokenId); - web3Wrapper.awaitTransactionSuccessAsync(txHash); - return tokenId; - }, -}; diff --git a/packages/contract-wrappers/test/utils/web3_wrapper.ts b/packages/contract-wrappers/test/utils/web3_wrapper.ts deleted file mode 100644 index 4e86ebeba..000000000 --- a/packages/contract-wrappers/test/utils/web3_wrapper.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { devConstants, web3Factory } from '@0x/dev-utils'; -import { Web3Wrapper } from '@0x/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, txDefaults }; diff --git a/packages/contract-wrappers/tsconfig.json b/packages/contract-wrappers/tsconfig.json deleted file mode 100644 index 2ee711adc..000000000 --- a/packages/contract-wrappers/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "lib", - "rootDir": "." - }, - "include": ["./src/**/*", "./test/**/*"] -} diff --git a/packages/contract-wrappers/tslint.json b/packages/contract-wrappers/tslint.json deleted file mode 100644 index dd9053357..000000000 --- a/packages/contract-wrappers/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@0x/tslint-config"] -} diff --git a/packages/contract-wrappers/typedoc-tsconfig.json b/packages/contract-wrappers/typedoc-tsconfig.json deleted file mode 100644 index c9b0af1ae..000000000 --- a/packages/contract-wrappers/typedoc-tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../typedoc-tsconfig", - "compilerOptions": { - "outDir": "lib" - }, - "include": ["./src/**/*", "./test/**/*"] -} diff --git a/packages/dev-tools-pages/.gitignore b/packages/dev-tools-pages/.gitignore deleted file mode 100644 index d70ebaa1d..000000000 --- a/packages/dev-tools-pages/.gitignore +++ /dev/null @@ -1 +0,0 @@ -public \ No newline at end of file diff --git a/packages/dev-tools-pages/README.md b/packages/dev-tools-pages/README.md deleted file mode 100644 index 47d7e5865..000000000 --- a/packages/dev-tools-pages/README.md +++ /dev/null @@ -1,88 +0,0 @@ -## Dev tools pages - -This repository contains our dev tools pages. - -## Local Dev Setup - -Requires Node version 6.9.5 or higher & yarn v1.9.4 - -### 1. Install dependencies for monorepo: - -Make sure you install Yarn v1.9.4 (npm won't work!). We rely on our `yarn.lock` file and on Yarn's support for `workspaces` in our monorepo setup. - -```bash -yarn install -``` - -### 2. Initial setup - -To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: - -```bash -PKG=@0x/dev-tools-pages yarn build -``` - -Note: Ignore the `WARNING in asset size limit` and `WARNING in entrypoint size limit` warnings. - -### 3. Run dev server - -```bash -cd packages/dev-tools-pages -yarn dev -``` - -Visit [http://localhost:3572/](http://localhost:3572/) in your browser. - -The webpage will refresh when source code is changed. - -### 4. Code! - -There are some basic primitives we'd like you to use: - -1. `Stuff`: Use containers instead of divs,spans,etc... and use it's props instead of inline styles (e.g `style={{margin: 3}}` should be `margin="3px"` - -2. `Look ma, text!`: Use text components whenever rendering text. It has props for manipulating texts, so again no in-line styles. Use `fontColor="red"`, not `style={{color: 'red'}}`. - -3. Styled-components: See the `ui/button.tsx` file for an example of how to use these. - -4. BassCss: This library gives you access to a bunch of [classes](http://basscss.com/) that apply styles in a browser-compatible way, has affordances for responsiveness and alleviates the need for inline styles or LESS/CSS files. - -With the above 4 tools and following the React paradigm, you shouldn't need CSS/LESS files. IF there are special occasions where you do, these is a `all.less` file, but this is a solution of last resort. Use it sparingly. - -### Clean - -```bash -yarn clean -``` - -### Lint - -```bash -yarn lint -``` - -### Prettier - -Run from the monorepo root directory: - -``` -yarn prettier -``` - -### Resources - -##### Toolkit - -- [Styled Components](https://www.styled-components.com/) -- [BassCSS](http://basscss.com/) - -##### Recommended Atom packages: - -- [atom-typescript](https://atom.io/packages/atom-typescript) -- [linter-tslint](https://atom.io/packages/linter-tslint) - -## Contributing - -We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. - -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. diff --git a/packages/dev-tools-pages/assets/crawl.html b/packages/dev-tools-pages/assets/crawl.html deleted file mode 100644 index 352300d73..000000000 --- a/packages/dev-tools-pages/assets/crawl.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - Test - - - - - diff --git a/packages/dev-tools-pages/assets/favicons/compiler.ico b/packages/dev-tools-pages/assets/favicons/compiler.ico deleted file mode 100644 index ff9409b2a..000000000 Binary files a/packages/dev-tools-pages/assets/favicons/compiler.ico and /dev/null differ diff --git a/packages/dev-tools-pages/assets/favicons/cov.ico b/packages/dev-tools-pages/assets/favicons/cov.ico deleted file mode 100644 index f04f4bf56..000000000 Binary files a/packages/dev-tools-pages/assets/favicons/cov.ico and /dev/null differ diff --git a/packages/dev-tools-pages/assets/favicons/profiler.ico b/packages/dev-tools-pages/assets/favicons/profiler.ico deleted file mode 100644 index 0a8fff329..000000000 Binary files a/packages/dev-tools-pages/assets/favicons/profiler.ico and /dev/null differ diff --git a/packages/dev-tools-pages/assets/favicons/trace.ico b/packages/dev-tools-pages/assets/favicons/trace.ico deleted file mode 100644 index 744a18860..000000000 Binary files a/packages/dev-tools-pages/assets/favicons/trace.ico and /dev/null differ diff --git a/packages/dev-tools-pages/assets/fonts/MaisonNeue-Bold-subset.woff2 b/packages/dev-tools-pages/assets/fonts/MaisonNeue-Bold-subset.woff2 deleted file mode 100644 index 54424f6fc..000000000 Binary files a/packages/dev-tools-pages/assets/fonts/MaisonNeue-Bold-subset.woff2 and /dev/null differ diff --git a/packages/dev-tools-pages/assets/fonts/MaisonNeue-Book-subset.woff2 b/packages/dev-tools-pages/assets/fonts/MaisonNeue-Book-subset.woff2 deleted file mode 100644 index 8c2dea7ef..000000000 Binary files a/packages/dev-tools-pages/assets/fonts/MaisonNeue-Book-subset.woff2 and /dev/null differ diff --git a/packages/dev-tools-pages/assets/images/og-compiler.png b/packages/dev-tools-pages/assets/images/og-compiler.png deleted file mode 100644 index 871e8f279..000000000 Binary files a/packages/dev-tools-pages/assets/images/og-compiler.png and /dev/null differ diff --git a/packages/dev-tools-pages/assets/images/og-cov.png b/packages/dev-tools-pages/assets/images/og-cov.png deleted file mode 100644 index 1cfeada7a..000000000 Binary files a/packages/dev-tools-pages/assets/images/og-cov.png and /dev/null differ diff --git a/packages/dev-tools-pages/assets/images/og-profiler.png b/packages/dev-tools-pages/assets/images/og-profiler.png deleted file mode 100644 index 4338f23ea..000000000 Binary files a/packages/dev-tools-pages/assets/images/og-profiler.png and /dev/null differ diff --git a/packages/dev-tools-pages/assets/images/og-trace.png b/packages/dev-tools-pages/assets/images/og-trace.png deleted file mode 100644 index 5318128f2..000000000 Binary files a/packages/dev-tools-pages/assets/images/og-trace.png and /dev/null differ diff --git a/packages/dev-tools-pages/assets/index.html b/packages/dev-tools-pages/assets/index.html deleted file mode 100644 index 5ab1a45f1..000000000 --- a/packages/dev-tools-pages/assets/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - <%= htmlWebpackPlugin.options.title %> - - -
- - \ No newline at end of file diff --git a/packages/dev-tools-pages/package.json b/packages/dev-tools-pages/package.json deleted file mode 100644 index feab72856..000000000 --- a/packages/dev-tools-pages/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "@0x/dev-tools-pages", - "version": "0.0.14", - "engines": { - "node": ">=6.12" - }, - "private": true, - "description": "0x Dev tools pages", - "scripts": { - "build": "node --max_old_space_size=8192 ../../node_modules/.bin/webpack --mode production", - "build:ci": "yarn build", - "build:dev": "../../node_modules/.bin/webpack --mode development", - "clean": "shx rm -f public/bundle*", - "lint": "tslint --format stylish --project . 'ts/**/*.ts' 'ts/**/*.tsx'", - "dev": "webpack-dev-server --mode development --content-base public", - "deploy:all": "npm run build; npm run deploy:compiler; npm run deploy:compiler:index; npm run deploy:coverage; npm run deploy:coverage:index; npm run deploy:profiler; npm run deploy:profiler:index; npm run deploy:trace; npm run deploy:trace:index;", - "deploy:compiler": "DIR_NAME=./public/. BUCKET=s3://sol-compiler.com yarn s3:sync --exclude 'bundle-cov*' --exclude 'bundle-trace*' --exclude 'bundle-profiler*'", - "deploy:coverage": "DIR_NAME=./public/. BUCKET=s3://sol-coverage.com yarn s3:sync --exclude 'bundle-compiler*' --exclude 'bundle-trace*' --exclude 'bundle-profiler*'", - "deploy:profiler": "DIR_NAME=./public/. BUCKET=s3://sol-profiler.com yarn s3:sync --exclude 'bundle-cov*' --exclude 'bundle-trace*' --exclude 'bundle-compiler*'", - "deploy:trace": "DIR_NAME=./public/. BUCKET=s3://sol-trace.com yarn s3:sync --exclude 'bundle-cov*' --exclude 'bundle-compiler*' --exclude 'bundle-profiler*'", - "deploy:compiler:index": "DIR_NAME=./public/compiler/. BUCKET=s3://sol-compiler.com yarn s3:sync", - "deploy:coverage:index": "DIR_NAME=./public/coverage/. BUCKET=s3://sol-coverage.com yarn s3:sync", - "deploy:profiler:index": "DIR_NAME=./public/profiler/. BUCKET=s3://sol-profiler.com yarn s3:sync", - "deploy:trace:index": "DIR_NAME=./public/trace/. BUCKET=s3://sol-trace.com yarn s3:sync", - "s3:sync": "aws s3 sync $DIR_NAME $BUCKET --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --exclude *.map.js --exclude 'profiler/*' --exclude 'trace/*' --exclude 'coverage/*' --exclude 'compiler/*'" - }, - "license": "Apache-2.0", - "dependencies": { - "@0x/react-shared": "^1.1.2", - "basscss": "^8.0.3", - "bowser": "^1.9.3", - "highlight.js": "^9.13.1", - "less": "^2.7.2", - "polished": "^1.9.2", - "react": "^16.5.2", - "react-dom": "^16.5.2", - "react-loadable": "^5.5.0", - "react-lottie": "^1.2.3", - "react-tabs": "^2.3.0", - "styled-components": "^4.1.1", - "styled-normalize": "^8.0.1" - }, - "devDependencies": { - "@types/highlight.js": "^9.12.3", - "@types/lodash": "4.14.104", - "@types/node": "*", - "@types/react": "^16.4.2", - "@types/react-dom": "^16.0.7", - "@types/react-loadable": "^5.4.1", - "@types/react-lottie": "^1.2.0", - "@types/react-router-dom": "^4.0.4", - "@types/react-tabs": "^2.3.0", - "@types/react-tap-event-plugin": "0.0.30", - "@types/styled-components": "4.1.1", - "awesome-typescript-loader": "^5.2.1", - "clean-webpack-plugin": "^0.1.19", - "copy-webpack-plugin": "^4.5.4", - "copyfiles": "^2.0.0", - "css-loader": "0.23.x", - "html-webpack-plugin": "^3.2.0", - "less-loader": "^4.1.0", - "make-promises-safe": "^1.1.0", - "raw-loader": "^0.5.1", - "react-svg-loader": "^2.1.0", - "shx": "^0.2.2", - "source-map-loader": "^0.2.4", - "style-loader": "0.23.x", - "terser-webpack-plugin": "^1.1.0", - "tslint": "5.11.0", - "tslint-config-0xproject": "^0.0.2", - "typescript": "3.0.1", - "uglifyjs-webpack-plugin": "^2.0.1", - "webpack": "^4.20.2", - "webpack-bundle-analyzer": "^3.0.3", - "webpack-cli": "3.1.2", - "webpack-dev-server": "^3.1.9" - } -} diff --git a/packages/dev-tools-pages/pages.js b/packages/dev-tools-pages/pages.js deleted file mode 100644 index 488c2ecd7..000000000 --- a/packages/dev-tools-pages/pages.js +++ /dev/null @@ -1,72 +0,0 @@ -const pages = [ - { - title: 'sol-compiler', - filename: 'compiler/index.html', - template: 'assets/index.html', - chunks: ['compiler'], - favicon: 'assets/favicons/compiler.ico', - minify: true, - meta: { - description: 'Solidity compilation that just works', - 'og-title': { property: 'og:title', content: 'sol-compiler' }, - 'og-description': { property: 'og:description', content: 'Solidity compilation that just works' }, - 'og-type': { property: 'og:type', content: 'website' }, - 'og-image': { property: 'og:image', content: '/images/og-compiler.png' }, - 'twitter:site': '@0xproject', - 'twitter:image': '/images/og-compiler.png', - }, - }, - { - title: 'sol-coverage', - filename: 'coverage/index.html', - template: 'assets/index.html', - chunks: ['coverage'], - favicon: 'assets/favicons/cov.ico', - minify: true, - meta: { - description: 'Solidity code coverage', - 'og-title': { property: 'og:title', content: 'sol-coverage' }, - 'og-description': { property: 'og:description', content: 'Solidity code coverage' }, - 'og-type': { property: 'og:type', content: 'website' }, - 'og-image': { property: 'og:image', content: '/images/og-cov.png' }, - 'twitter:site': '@0xproject', - 'twitter:image': '/images/og-cov.png', - }, - }, - { - title: 'sol-profiler', - filename: 'profiler/index.html', - template: 'assets/index.html', - chunks: ['profiler'], - favicon: 'assets/favicons/profiler.ico', - minify: true, - meta: { - description: 'Gas profiling for Solidity', - 'og-title': { property: 'og:title', content: 'sol-profiler' }, - 'og-description': { property: 'og:description', content: 'Gas profiling for Solidity' }, - 'og-type': { property: 'og:type', content: 'website' }, - 'og-image': { property: 'og:image', content: '/images/og-profiler.png' }, - 'twitter:site': '@0xproject', - 'twitter:image': '/images/og-profiler.png', - }, - }, - { - title: 'sol-trace', - filename: 'trace/index.html', - template: 'assets/index.html', - chunks: ['trace'], - favicon: 'assets/favicons/trace.ico', - minify: true, - meta: { - description: 'Human-readable stack traces', - 'og-title': { property: 'og:title', content: 'sol-trace' }, - 'og-description': { property: 'og:description', content: 'Human-readable stack traces' }, - 'og-type': { property: 'og:type', content: 'website' }, - 'og-image': { property: 'og:image', content: '/images/og-trace.png' }, - 'twitter:site': '@0xproject', - 'twitter:image': '/images/og-trace.png', - }, - }, -]; - -module.exports = pages; diff --git a/packages/dev-tools-pages/ts/components/animations/compiler/data.json b/packages/dev-tools-pages/ts/components/animations/compiler/data.json deleted file mode 100644 index 6b10e537b..000000000 --- a/packages/dev-tools-pages/ts/components/animations/compiler/data.json +++ /dev/null @@ -1 +0,0 @@ -{"v":"5.4.1","fr":30,"ip":0,"op":420,"w":4300,"h":1400,"nm":"header-compiler","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":2,"ty":4,"nm":"Path Copy 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[328.5,911.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-61.75,-99.75],[99.75,61.75],[61.75,99.75],[-99.75,-61.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 3","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Path","parent":16,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-280,-180,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-39.25,87.75],[87.75,-39.25],[39.25,-87.75],[-87.75,39.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1261.5,738.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[15.75,82.75],[82.75,15.75],[-15.75,-82.75],[-82.75,-15.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Path","parent":12,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[370,-209,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[23.25,-23.25],[-23.25,23.25]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Path","parent":12,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[347,-269,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-60.25,-60.25],[60.25,60.25]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Path","parent":12,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[330,-250,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-37.25,-84.25],[84.25,37.25],[37.25,84.25],[-84.25,-37.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Path Copy","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[449.5,348.5,0],"e":[223.5,574.5,0],"to":[-37.6666679382324,37.6666679382324,0],"ti":[37.6666679382324,-37.6666679382324,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":210,"s":[223.5,574.5,0],"e":[223.5,574.5,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390.5,"s":[223.5,574.5,0],"e":[449.5,348.5,0],"to":[37.6666679382324,-37.6666679382324,0],"ti":[-37.6666679382324,37.6666679382324,0]},{"t":420}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[9.42,-69.25],[-69.25,9.42],[-9.42,69.25],[69.25,-9.42]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[2150,700,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-1935,-90],[-1765,-260]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-2020,87],[-1946,13]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":210,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-2020,87],[-1946,13]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-2020,87],[-1946,13]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-2020,87],[-1946,13]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-1935,-90],[-1765,-260]],"c":false}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117647066303,0.678431372549,0.803921628466,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":true},{"ty":"tr","p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[1,-1],"e":[0,0],"to":[-0.16666667163372,0.16666667163372],"ti":[0.16666667163372,-0.16666667163372]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":210,"s":[0,0],"e":[0,0],"to":[0,0],"ti":[0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[0,0],"e":[1,-1],"to":[0.16666667163372,-0.16666667163372],"ti":[-0.16666667163372,0.16666667163372]},{"t":420}],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":527,"st":0,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[2150,700,0],"e":[1920,930,0],"to":[-38.3333320617676,38.3333320617676,0],"ti":[38.3333320617676,-38.3333320617676,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":210,"s":[1920,930,0],"e":[1920,930,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[1920,930,0],"e":[2150,700,0],"to":[38.3333320617676,-38.3333320617676,0],"ti":[-38.3333320617676,38.3333320617676,0]},{"t":420}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-1806,-241],[-1748,-183]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-1750,-185],[-1748,-183]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":210,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-1750,-185],[-1748,-183]],"c":true}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-1750,-185],[-1748,-183]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-1750,-185],[-1748,-183]],"c":true}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-1806,-241],[-1748,-183]],"c":false}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117647066303,0.678431372549,0.803921628466,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":true},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":527,"st":0,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"Path Copy 2","parent":8,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-134,194,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[28.03,-56.75],[-56.75,28.03],[-28.03,56.75],[56.75,-28.03]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[56.53,-28.25],[20.5,9.03],[20.72,9.25],[56.75,-28.03]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[56.53,-28.25],[20.5,9.03],[20.72,9.25],[56.75,-28.03]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[56.53,-28.25],[20.5,9.03],[20.72,9.25],[56.75,-28.03]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":391,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[56.53,-28.25],[20.5,9.03],[20.72,9.25],[56.75,-28.03]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[28.03,-56.75],[-56.75,28.03],[-28.03,56.75],[56.75,-28.03]],"c":true}]},{"t":421}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 2","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":12,"ty":4,"nm":"Big block","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[571.5,588.5,0],"e":[697.5,462.5,0],"to":[21,-21,0],"ti":[-21,21,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.167,"y":0.167},"n":"0p667_0p667_0p167_0p167","t":120,"s":[697.5,462.5,0],"e":[697.5,462.5,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":300,"s":[697.5,462.5,0],"e":[571.5,588.5,0],"to":[-21,21,0],"ti":[21,-21,0]},{"t":330}],"ix":2},"a":{"a":0,"k":[2,-2,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"st","c":{"a":0,"k":[0.117646998985,0.67843095368,0.803921987496,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[60.75,-182.25],[-182.25,60.75],[-60.75,182.25],[182.25,-60.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":13,"ty":4,"nm":"Path Copy 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[389.5,770.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-92.25,-29.25],[-92.25,-29.25],[29.25,92.25],[29.25,92.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-29.25,-92.25],[-92.25,-29.25],[29.25,92.25],[92.25,29.25]],"c":true}]},{"t":120}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 4","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":14,"ty":4,"nm":"Path Copy 9","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[273,647,0],"e":[317,695,0],"to":[7.33333349227905,8,0],"ti":[-7.33333349227905,-8,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":120,"s":[317,695,0],"e":[317,695,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":300,"s":[317,695,0],"e":[273,647,0],"to":[-7.33333349227905,-8,0],"ti":[7.33333349227905,8,0]},{"t":330}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[30.75,-31.25],[-31.5,31]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 9","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":15,"ty":4,"nm":"Path Copy 8","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[329,832,0],"e":[349,812,0],"to":[3.33333325386047,-3.33333325386047,0],"ti":[-3.33333325386047,3.33333325386047,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":120,"s":[349,812,0],"e":[349,812,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":300,"s":[349,812,0],"e":[329,832,0],"to":[-3.33333325386047,3.33333325386047,0],"ti":[3.33333325386047,-3.33333325386047,0]},{"t":330}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-61,-61],[61,61]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 8","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":16,"ty":4,"nm":"wide box","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[971.5,988.5,0],"e":[1096.5,864.5,0],"to":[10.0566339492798,-9.97618103027344,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":120,"s":[1096.5,864.5,0],"e":[1096.5,864.5,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":300,"s":[1096.5,864.5,0],"e":[971.5,988.5,0],"to":[0,0,0],"ti":[-20.8333339691162,20.6666660308838,0]},{"t":330}],"ix":2},"a":{"a":0,"k":[-1,1,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-129.25,-52.25],[-52.25,-129.25],[129.25,52.25],[52.25,129.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":17,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[993,766,0],"e":[1071,688,0],"to":[13,-13,0],"ti":[-13,13,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":120,"s":[1071,688,0],"e":[1071,688,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":300,"s":[1071,688,0],"e":[993,766,0],"to":[-13,13,0],"ti":[13,-13,0]},{"t":330}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-89.5,-89.5],[89.5,89.5]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":18,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[1115,850,0],"e":[1311.5,799.5,0],"to":[18.5410747528076,-4.90381097793579,0],"ti":[-5.73690891265869,1.51731848716736,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":120,"s":[1311.5,799.5,0],"e":[1311.5,799.5,0],"to":[33.0833320617676,-8.75,0],"ti":[5.73690891265869,-1.51731848716736,0]},{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":300,"s":[1311.5,799.5,0],"e":[1115,850,0],"to":[-5.73690891265869,1.51731848716736,0],"ti":[-33.0833320617676,8.75,0]},{"t":330}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[103.689,103.689,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[30.5,-30.5],[-30.5,30.5]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":19,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1011.5,748.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"n":"0p833_0p833_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[120.75,57.75],[58.25,120.25],[-120.25,-58.25],[-57.75,-120.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[120.514,57.986],[119.427,59.073],[-59.073,-119.427],[-57.986,-120.514]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":120,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[120.514,57.986],[119.427,59.073],[-59.073,-119.427],[-57.986,-120.514]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[120.514,57.986],[119.427,59.073],[-59.073,-119.427],[-57.986,-120.514]],"c":true}]},{"i":{"x":0.833,"y":1},"o":{"x":0.167,"y":0.167},"n":"0p833_1_0p167_0p167","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[120.514,57.986],[119.427,59.073],[-59.073,-119.427],[-57.986,-120.514]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[120.75,57.75],[58.25,120.25],[-120.25,-58.25],[-57.75,-120.75]],"c":true}]},{"t":330}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":0,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":20,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3620,905,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[33,163],[-163,-33],[-33,-163],[163,33]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":21,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3274,751,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[86,-140],[140,-86],[-86,140],[-140,86]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":22,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3770,475,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-2,-162],[162,2],[2,162],[-162,-2]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":23,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3465,340,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[80,-24],[24,-80],[-82,26],[-26,82]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":24,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[3420.5,966.5,0],"e":[3389.5,996.5,0],"to":[-5.16666650772095,5,0],"ti":[5.16666650772095,-5,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.167,"y":0.167},"n":"0p667_0p667_0p167_0p167","t":120,"s":[3389.5,996.5,0],"e":[3389.5,996.5,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[3389.5,996.5,0],"e":[3420.5,966.5,0],"to":[5.16666650772095,-5,0],"ti":[-5.16666650772095,5,0]},{"t":330}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-62.75,-62.75],[-62.25,-62.25]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-62.75,-62.75],[62.75,62.75]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"n":"0p667_1_0p167_0","t":120,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-62.75,-62.75],[62.75,62.75]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-62.75,-62.75],[62.75,62.75]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-62.75,-62.75],[62.75,62.75]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-62.75,-62.75],[-62.25,-62.25]],"c":false}]},{"t":330}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":25,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[3219.5,915.5,0],"e":[3339.5,1035.5,0],"to":[20,20,0],"ti":[-20,-20,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.167,"y":0.167},"n":"0p667_0p667_0p167_0p167","t":120,"s":[3339.5,1035.5,0],"e":[3339.5,1035.5,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[3339.5,1035.5,0],"e":[3219.5,915.5,0],"to":[-20,-20,0],"ti":[20,20,0]},{"t":330}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[38.25,-38.25],[38.25,-38.25]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[38.25,-38.25],[-38.25,38.25]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"n":"0p667_1_0p167_0","t":120,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[38.25,-38.25],[-38.25,38.25]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[38.25,-38.25],[-38.25,38.25]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[38.25,-38.25],[-38.25,38.25]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[38.25,-38.25],[38.25,-38.25]],"c":false}]},{"t":330}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":26,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3344,1041,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[42,42],[0,0],[0,0],[0,0]],"v":[[-25,-101],[-24,-100],[-24.5,-99.5],[-25.5,-100.5]],"c":false}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-25,-101],[101,25],[25,101],[-101,-25]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"n":"0p667_1_0p167_0","t":120,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-25,-101],[101,25],[25,101],[-101,-25]],"c":false}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-25,-101],[101,25],[25,101],[-101,-25]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-25,-101],[101,25],[25,101],[-101,-25]],"c":false}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[42,42],[0,0],[0,0],[0,0]],"v":[[-25,-101],[-24,-100],[-24.5,-99.5],[-25.5,-100.5]],"c":false}]},{"t":330}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":27,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[3142.5,483.5,0],"e":[3266.5,359.5,0],"to":[20.6666660308838,-20.6666660308838,0],"ti":[-20.6666660308838,20.6666660308838,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":120,"s":[3266.5,359.5,0],"e":[3266.5,359.5,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[3266.5,359.5,0],"e":[3142.5,483.5,0],"to":[-20.6666660308838,20.6666660308838,0],"ti":[20.6666660308838,-20.6666660308838,0]},{"t":330}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-73.25,-73.25],[73.25,73.25]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-33.25,-33.25],[73.25,73.25]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":120,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-33.25,-33.25],[73.25,73.25]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-33.25,-33.25],[73.25,73.25]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-33.25,-33.25],[73.25,73.25]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-73.25,-73.25],[73.25,73.25]],"c":false}]},{"t":329.5}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":28,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[3163,420,0],"e":[3327,588,0],"to":[27.3333339691162,28,0],"ti":[-27.3333339691162,-28,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":120,"s":[3327,588,0],"e":[3327,588,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[3327,588,0],"e":[3163,420,0],"to":[-27.3333339691162,-28,0],"ti":[27.3333339691162,28,0]},{"t":330}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[42,-42],[-42,42]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[42,-42],[42.312,-42.125]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":120,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[42,-42],[42.312,-42.125]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[42,-42],[42.312,-42.125]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[42,-42],[42.312,-42.125]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[42,-42],[-42,42]],"c":false}]},{"t":330}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":29,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3184,441,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[31,115],[-115,-31],[-31,-115],[115,31]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[113.5,31.5],[8,-74],[8,-74],[113.5,31.5]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":120,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[113.5,31.5],[8,-74],[8,-74],[113.5,31.5]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[113.5,31.5],[8,-74],[8,-74],[113.5,31.5]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[113.5,31.5],[8,-74],[8,-74],[113.5,31.5]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[31,115],[-115,-31],[-31,-115],[115,31]],"c":true}]},{"t":330}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":30,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[2954,751,0],"e":[3120,585,0],"to":[27.6666660308838,-27.6666660308838,0],"ti":[-27.6666660308838,27.6666660308838,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":120,"s":[3120,585,0],"e":[3120,585,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[3120,585,0],"e":[2954,751,0],"to":[-27.6666660308838,27.6666660308838,0],"ti":[27.6666660308838,-27.6666660308838,0]},{"t":330}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[146,-40],[40,-146],[-146,40],[-40,146]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117646999657,0.678430974483,0.803921997547,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":31,"ty":4,"nm":"Shape Layer 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":188,"s":[2046,804,0],"e":[2150,700,0],"to":[17.3333339691162,-17.3333339691162,0],"ti":[-17.3333339691162,17.3333339691162,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":210,"s":[2150,700,0],"e":[2150,700,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[2150,700,0],"e":[2046,804,0],"to":[-17.3333339691162,17.3333339691162,0],"ti":[17.3333339691162,-17.3333339691162,0]},{"t":410}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[1727,-6],[1858,125]],"c":true}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[1727,-6],[1968,235]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":210,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[1727,-6],[1968,235]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[1727,-6],[1968,235]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[1727,-6],[1968,235]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[1727,-6],[1858,125]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117647066303,0.678431372549,0.803921628466,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":527,"st":0,"bm":0},{"ddd":0,"ind":32,"ty":4,"nm":"Shape Layer 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[2120,670,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[1684,158],[1685,157]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[1746,220],[1963,3]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":210,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[1746,220],[1963,3]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[1746,220],[1963,3]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[1746,220],[1963,3]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[1684,158],[1685,157]],"c":false}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117647066303,0.678431372549,0.803921628466,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":527,"st":0,"bm":0},{"ddd":0,"ind":33,"ty":4,"nm":"Shape Layer 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3138,417,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0]],"o":[[0,0]],"v":[[-2516,745]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117647066303,0.678431372549,0.803921628466,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[1,-1],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 2","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[636,382],[636,382],[766,512],[766,512]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[854,164],[636,382],[876,622],[1094,404]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[854,164],[636,382],[876,622],[1094,404]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[854,164],[636,382],[876,622],[1094,404]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[854,164],[636,382],[876,622],[1094,404]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[636,382],[636,382],[766,512],[766,512]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.117647066303,0.678431372549,0.803921628466,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":527,"st":0,"bm":0}],"markers":[{"tm":90,"cm":"1","dr":0},{"tm":120,"cm":"2","dr":0},{"tm":180,"cm":"3","dr":0},{"tm":210,"cm":"4","dr":0},{"tm":300,"cm":"5","dr":0},{"tm":330,"cm":"6","dr":0},{"tm":390,"cm":"7","dr":0},{"tm":420,"cm":"8","dr":0}]} \ No newline at end of file diff --git a/packages/dev-tools-pages/ts/components/animations/compiler/index.tsx b/packages/dev-tools-pages/ts/components/animations/compiler/index.tsx deleted file mode 100644 index ba98f8da3..000000000 --- a/packages/dev-tools-pages/ts/components/animations/compiler/index.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import * as React from 'react'; - -import { BaseAnimation } from '../index'; - -import * as animationData from './data.json'; - -const CompilerAnimation: React.StatelessComponent<{}> = () => ( - -); - -export { CompilerAnimation }; diff --git a/packages/dev-tools-pages/ts/components/animations/cov/data.json b/packages/dev-tools-pages/ts/components/animations/cov/data.json deleted file mode 100644 index a259c2787..000000000 --- a/packages/dev-tools-pages/ts/components/animations/cov/data.json +++ /dev/null @@ -1 +0,0 @@ -{"v":"5.4.1","fr":30,"ip":0,"op":420,"w":3962,"h":1320,"nm":"header-cov","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":2,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3418.5,924.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.696,"y":1},"o":{"x":0.304,"y":0},"n":"0p696_1_0p304_0","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[31.25,66.25],[66.25,31.25],[-31.25,-66.25],[-66.25,-31.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[21.25,86.25],[71.25,36.25],[-31.25,-66.25],[-81.25,-16.25]],"c":true}]},{"i":{"x":0.696,"y":1},"o":{"x":0.333,"y":0},"n":"0p696_1_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[21.25,86.25],[71.25,36.25],[-31.25,-66.25],[-81.25,-16.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[21.25,86.25],[71.25,36.25],[-31.25,-66.25],[-81.25,-16.25]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[21.25,86.25],[71.25,36.25],[-31.25,-66.25],[-81.25,-16.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[31.25,66.25],[66.25,31.25],[-31.25,-66.25],[-66.25,-31.25]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3392.5,970.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[18.25,89.25],[89.25,18.25],[-18.25,-89.25],[-89.25,-18.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[2958,886,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[64,-94],[94,-64],[-64,94],[-94,64]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[80,-126],[118,-88],[-64,94],[-102,56]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":120,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[80,-126],[118,-88],[-64,94],[-102,56]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[80,-126],[118,-88],[-64,94],[-102,56]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[80,-126],[118,-88],[-64,94],[-102,56]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[64,-94],[94,-64],[-64,94],[-94,64]],"c":true}]},{"t":330}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[2988,816,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[79,-129],[129,-79],[-79,129],[-129,79]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3588,678,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0]],"o":[[0,0]],"v":[[-3784,-472]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.733332974303,0.572548959769,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":true},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.167,"y":0},"n":"0p833_1_0p167_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-18.5,-75],[75,18.5],[18.5,75],[-75,-18.5]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-26.5,-27],[47,46.5],[18.5,75],[-55,1.5]],"c":true}]},{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":120,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-26.5,-27],[47,46.5],[18.5,75],[-55,1.5]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-26.5,-27],[47,46.5],[18.5,75],[-55,1.5]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-26.5,-27],[47,46.5],[18.5,75],[-55,1.5]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-18.5,-75],[75,18.5],[18.5,75],[-75,-18.5]],"c":true}]},{"t":330}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3678,548,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[26.5,-140],[140,-26.5],[-26.5,140],[-140,26.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3650.5,150.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-11.75,59.25],[59.25,-11.75],[11.75,-59.25],[-59.25,11.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3272.5,260.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[31.25,66.25],[66.25,31.25],[-31.25,-66.25],[-66.25,-31.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[27.25,34.25],[48.25,13.25],[-31.25,-66.25],[-52.25,-45.25]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":211,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[27.25,34.25],[48.25,13.25],[-31.25,-66.25],[-52.25,-45.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[27.25,34.25],[48.25,13.25],[-31.25,-66.25],[-52.25,-45.25]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[27.25,34.25],[48.25,13.25],[-31.25,-66.25],[-52.25,-45.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[31.25,66.25],[66.25,31.25],[-31.25,-66.25],[-66.25,-31.25]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3246.5,306.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[18.25,89.25],[89.25,18.25],[-18.25,-89.25],[-89.25,-18.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[2758.5,720.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-33.25,11.75],[-11.75,33.25],[33.25,-11.75],[11.75,-33.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":12,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[2729.5,707.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-47.75,5.25],[-5.25,47.75],[47.75,-5.25],[5.25,-47.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":13,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1285.5,815.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[36.75,-8.25],[-8.25,36.75],[-36.75,8.25],[8.25,-36.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[94.75,37.75],[43.75,88.75],[-36.75,8.25],[14.25,-42.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":211,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[94.75,37.75],[43.75,88.75],[-36.75,8.25],[14.25,-42.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[94.75,37.75],[43.75,88.75],[-36.75,8.25],[14.25,-42.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[94.75,37.75],[43.75,88.75],[-36.75,8.25],[14.25,-42.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[36.75,-8.25],[-8.25,36.75],[-36.75,8.25],[8.25,-36.75]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":14,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1415.5,905.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[101.75,36.75],[36.75,101.75],[-101.75,-36.75],[-36.75,-101.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":15,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[611,329,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[62.5,-95.5],[95.5,-62.5],[-62.5,95.5],[-95.5,62.5]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[43,-47],[61.5,-28.5],[-62.5,95.5],[-81,77]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":120,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[43,-47],[61.5,-28.5],[-62.5,95.5],[-81,77]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[43,-47],[61.5,-28.5],[-62.5,95.5],[-81,77]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[43,-47],[61.5,-28.5],[-62.5,95.5],[-81,77]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[62.5,-95.5],[95.5,-62.5],[-62.5,95.5],[-95.5,62.5]],"c":true}]},{"t":329}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":16,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[644,262,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[79,-129],[129,-79],[-79,129],[-129,79]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":17,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1126.5,374.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[39.25,16.25],[16.25,39.25],[-39.25,-16.25],[-16.25,-39.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":18,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1186.5,414.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[69.25,36.25],[36.25,69.25],[-69.25,-36.25],[-36.25,-69.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":19,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[375,944,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-36,19.5],[-0.5,-16],[166,150.5],[130.5,186]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-10,45.5],[13.5,22],[154,162.5],[130.5,186]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-10,45.5],[13.5,22],[154,162.5],[130.5,186]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-10,45.5],[13.5,22],[154,162.5],[130.5,186]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-10,45.5],[13.5,22],[154,162.5],[130.5,186]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-36,19.5],[-0.5,-16],[166,150.5],[130.5,186]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":20,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[375,944,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-186,-130.5],[-130.5,-186],[186,130.5],[130.5,186]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":21,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[815.5,863.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[39.75,-93.75],[93.75,-39.75],[-39.75,93.75],[-93.75,39.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[33.25,-145.25],[116.25,-62.25],[-39.75,93.75],[-122.75,10.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":120,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[33.25,-145.25],[116.25,-62.25],[-39.75,93.75],[-122.75,10.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[33.25,-145.25],[116.25,-62.25],[-39.75,93.75],[-122.75,10.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[33.25,-145.25],[116.25,-62.25],[-39.75,93.75],[-122.75,10.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[39.75,-93.75],[93.75,-39.75],[-39.75,93.75],[-93.75,39.75]],"c":true}]},{"t":329}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0},{"ddd":0,"ind":22,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[777.5,721.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[20.75,-164.75],[164.75,-20.75],[-20.75,164.75],[-164.75,20.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7333329916,0.572548985481,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":524.5,"st":0,"bm":0}],"markers":[{"tm":90,"cm":"1","dr":0},{"tm":120,"cm":"2","dr":0},{"tm":180,"cm":"3","dr":0},{"tm":210,"cm":"4","dr":0},{"tm":300,"cm":"5","dr":0},{"tm":330,"cm":"6","dr":0},{"tm":390,"cm":"7","dr":0},{"tm":420,"cm":"8","dr":0}]} \ No newline at end of file diff --git a/packages/dev-tools-pages/ts/components/animations/cov/index.tsx b/packages/dev-tools-pages/ts/components/animations/cov/index.tsx deleted file mode 100644 index bd872cc85..000000000 --- a/packages/dev-tools-pages/ts/components/animations/cov/index.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import * as React from 'react'; - -import { BaseAnimation } from '../index'; - -import * as animationData from './data.json'; - -const CovAnimation: React.StatelessComponent<{}> = () => ( - -); - -export { CovAnimation }; diff --git a/packages/dev-tools-pages/ts/components/animations/index.tsx b/packages/dev-tools-pages/ts/components/animations/index.tsx deleted file mode 100644 index 106acf707..000000000 --- a/packages/dev-tools-pages/ts/components/animations/index.tsx +++ /dev/null @@ -1,93 +0,0 @@ -import * as React from 'react'; -import Lottie from 'react-lottie'; -import styled from 'styled-components'; - -import { media } from 'ts/variables'; - -interface AnimationProps { - animationData: object; - width: number; - height: number; -} - -interface AnimationState { - width?: number | undefined; - height?: number | undefined; -} - -class BaseAnimation extends React.PureComponent { - public state: AnimationState = { - height: undefined, - width: undefined, - }; - private _timeout = undefined as number; - public componentDidMount(): void { - this._updateAnimationSize(); - window.addEventListener('resize', this._handleResize.bind(this)); - } - public componentWillUnmount(): void { - window.removeEventListener('resize', this._handleResize.bind(this)); - } - public render(): React.ReactNode { - const { animationData } = this.props; - const height = this.state.height || this.props.height; - const width = this.state.width || this.props.width; - - return ( - - - - - - ); - } - private _handleResize(): void { - clearTimeout(this._timeout); - this._timeout = window.setTimeout(this._updateAnimationSize.bind(this), 50); - } - private _updateAnimationSize(): void { - const windowWidth = window.innerWidth; - let width; - let height; - if (windowWidth <= 1000) { - const maxWidth = windowWidth + 250; - const ratio = maxWidth / this.props.width; - - height = Math.round(this.props.height * ratio); - width = Math.round(this.props.width * ratio); - } - - this.setState({ width, height }); - } -} - -const Container = styled.div` - width: 100%; - height: ${props => props.height}px; - position: absolute; - top: 40%; - left: 0; - z-index: -1; - overflow: hidden; - ${media.large` - top: 100%; - transform: translateY(-50%); - `}; -`; - -const InnerContainer = styled.div` - position: absolute; - top: 0; - left: 50%; - transform: translateX(-50%); -`; - -export { BaseAnimation }; diff --git a/packages/dev-tools-pages/ts/components/animations/profiler/data.json b/packages/dev-tools-pages/ts/components/animations/profiler/data.json deleted file mode 100644 index 2d769bc50..000000000 --- a/packages/dev-tools-pages/ts/components/animations/profiler/data.json +++ /dev/null @@ -1 +0,0 @@ -{"v":"5.4.1","fr":30,"ip":0,"op":420,"w":3970,"h":1314,"nm":"header-profiler","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":2,"ty":4,"nm":"Path Copy","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":90,"s":[376,448,0],"e":[376,392,0],"to":[0,-9.33333301544189,0],"ti":[0,9.33333301544189,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":120,"s":[376,392,0],"e":[376,392,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[376,392,0],"e":[376,448,0],"to":[0,9.33333301544189,0],"ti":[0,-9.33333301544189,0]},{"t":330}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-169.69,0],[134.5,0]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-142.19,0],[106.5,0]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":120,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-142.19,0],[106.5,0]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-142.19,0],[106.5,0]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-142.19,0],[106.5,0]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-169.69,0],[134.5,0]],"c":false}]},{"t":330}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3466.5,998.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[45.75,155.75],[-155.75,-45.75],[-45.75,-155.75],[155.75,45.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[1090.5,537,0],"e":[1170.5,617,0],"to":[12.0437898635864,12.0437898635864,0],"ti":[-1.2895439863205,-1.2895439863205,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":120,"s":[1170.5,617,0],"e":[1170.5,617,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[1170.5,617,0],"e":[1090.5,537,0],"to":[-13.3333330154419,-13.3333330154419,0],"ti":[13.3333330154419,13.3333330154419,0]},{"t":330}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-41.25,-0.5],[41.25,-0.5]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":180,"s":[834,765,0],"e":[834,813,0],"to":[0,8,0],"ti":[0,-8,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0.333},"n":"0p833_0p833_0p333_0p333","t":210,"s":[834,813,0],"e":[834,813,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[834,813,0],"e":[834,765,0],"to":[0,-8,0],"ti":[0,8,0]},{"t":419}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.999},"o":{"x":0.167,"y":0.001},"n":"0p833_0p999_0p167_0p001","t":180,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-100,-0.5],[100,-0.5]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-122,-0.5],[125,-0.5]],"c":true}]},{"i":{"x":0.833,"y":0.999},"o":{"x":0.333,"y":0},"n":"0p833_0p999_0p333_0","t":210,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-122,-0.5],[125,-0.5]],"c":true}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-122,-0.5],[125,-0.5]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-122,-0.5],[125,-0.5]],"c":true}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-100,-0.5],[100,-0.5]],"c":false}]},{"t":419}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":180,"s":[748.5,387,0],"e":[748.5,347,0],"to":[0,-6.66666650772095,0],"ti":[0,6.66666650772095,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0.333},"n":"0p833_0p833_0p333_0p333","t":210,"s":[748.5,347,0],"e":[748.5,347,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[748.5,347,0],"e":[748.5,387,0],"to":[0,6.66666650772095,0],"ti":[0,-6.66666650772095,0]},{"t":419}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.999},"o":{"x":0.167,"y":0.001},"n":"0p833_0p999_0p167_0p001","t":180,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-36.25,-0.5],[36.25,-0.5]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-57.75,-3],[58.75,-3]],"c":true}]},{"i":{"x":0.833,"y":0.999},"o":{"x":0.333,"y":0},"n":"0p833_0p999_0p333_0","t":210,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-57.75,-3],[58.75,-3]],"c":true}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-57.75,-3],[58.75,-3]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-57.75,-3],[58.75,-3]],"c":true}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-36.25,-0.5],[36.25,-0.5]],"c":false}]},{"t":419}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":180,"s":[3006.5,763,0],"e":[3006.5,823,0],"to":[0,10,0],"ti":[0,-10,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0.333},"n":"0p833_0p833_0p333_0p333","t":210,"s":[3006.5,823,0],"e":[3006.5,823,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[3006.5,823,0],"e":[3006.5,763,0],"to":[0,-10,0],"ti":[0,10,0]},{"t":419}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.999},"o":{"x":0.167,"y":0},"n":"0p833_0p999_0p167_0","t":180,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-66.25,-0.5],[66.25,-0.5]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-36.25,-0.5],[36.25,-0.5]],"c":true}]},{"i":{"x":0.833,"y":0.999},"o":{"x":0.333,"y":0},"n":"0p833_0p999_0p333_0","t":210,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-36.25,-0.5],[36.25,-0.5]],"c":true}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-36.25,-0.5],[36.25,-0.5]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-36.25,-0.5],[36.25,-0.5]],"c":true}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-66.25,-0.5],[66.25,-0.5]],"c":false}]},{"t":419}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":180,"s":[3375.5,857,0],"e":[3375.5,817,0],"to":[0,-6.66666650772095,0],"ti":[0,6.66666650772095,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0.333},"n":"0p833_0p833_0p333_0p333","t":210,"s":[3375.5,817,0],"e":[3375.5,817,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[3375.5,817,0],"e":[3375.5,857,0],"to":[0,6.66666650772095,0],"ti":[0,-6.66666650772095,0]},{"t":419}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.999},"o":{"x":0.167,"y":0.001},"n":"0p833_0p999_0p167_0p001","t":180,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-84.25,-0.5],[84.25,-0.5]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-63.75,-0.5],[64.25,-0.5]],"c":true}]},{"i":{"x":0.833,"y":0.999},"o":{"x":0.333,"y":0},"n":"0p833_0p999_0p333_0","t":210,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-63.75,-0.5],[64.25,-0.5]],"c":true}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-63.75,-0.5],[64.25,-0.5]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-63.75,-0.5],[64.25,-0.5]],"c":true}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-84.25,-0.5],[84.25,-0.5]],"c":false}]},{"t":419}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-63.75,-0.5],[64.25,-0.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":1,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":90,"s":[3511,409,0],"e":[3491,289,0],"to":[-3.33333325386047,-20,0],"ti":[3.33333325386047,20,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":120,"s":[3491,289,0],"e":[3491,289,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[3491,289,0],"e":[3511,409,0],"to":[3.33333325386047,20,0],"ti":[-3.33333325386047,-20,0]},{"t":330}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-51.5,-0.5],[50.5,-0.5]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-101.5,-0.5],[120.5,-0.5]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":120,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-101.5,-0.5],[120.5,-0.5]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-101.5,-0.5],[120.5,-0.5]],"c":false}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-101.5,-0.5],[120.5,-0.5]],"c":false}],"e":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-51.5,-0.5],[50.5,-0.5]],"c":false}]},{"t":330}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"Path Copy 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[3718.5,576,0],"e":[3598.5,696,0],"to":[-20,20,0],"ti":[20,-20,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":120,"s":[3598.5,696,0],"e":[3598.5,696,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[3598.5,696,0],"e":[3718.5,576,0],"to":[20,-20,0],"ti":[-20,20,0]},{"t":332}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-39.25,0],[39.25,0]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 2","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3738,557,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[114.5,-75],[75,-114.5],[-114.5,75],[-75,114.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":12,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3502,257,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[127,4.5],[4.5,127],[-127,-4.5],[-4.5,-127]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":13,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[2653.5,703.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-92.25,55.75],[-55.75,92.25],[92.25,-55.75],[55.75,-92.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":14,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3087.5,645.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[40.25,-124.75],[124.75,-40.25],[-40.25,124.75],[-124.75,40.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":15,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1728,878,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[66,15],[15,66],[-66,-15],[-15,-66]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":16,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1200,646,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-95.5,-137],[-137,-95.5],[95.5,137],[137,95.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":17,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[356.5,496.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-7.75,-176.75],[-176.75,-7.75],[7.75,176.75],[176.75,7.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":18,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[821.5,268.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[36.25,-95.25],[95.25,-36.25],[-36.25,95.25],[-95.25,36.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":19,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[634.5,1150.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-8.75,68.25],[68.25,-8.75],[8.75,-68.25],[-68.25,8.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":20,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[858,834,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[11,135],[-135,-11],[-11,-135],[135,11]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.44313699007,0.2666670084,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0}],"markers":[{"tm":90,"cm":"1","dr":0},{"tm":120,"cm":"2","dr":0},{"tm":180,"cm":"3","dr":0},{"tm":210,"cm":"4","dr":0},{"tm":300,"cm":"5","dr":0},{"tm":330,"cm":"6","dr":0},{"tm":390,"cm":"7","dr":0},{"tm":419,"cm":"8","dr":0}]} \ No newline at end of file diff --git a/packages/dev-tools-pages/ts/components/animations/profiler/index.tsx b/packages/dev-tools-pages/ts/components/animations/profiler/index.tsx deleted file mode 100644 index a2848b762..000000000 --- a/packages/dev-tools-pages/ts/components/animations/profiler/index.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import * as React from 'react'; - -import { BaseAnimation } from '../index'; - -import * as animationData from './data.json'; - -const ProfilerAnimation: React.StatelessComponent<{}> = () => ( - -); - -export { ProfilerAnimation }; diff --git a/packages/dev-tools-pages/ts/components/animations/trace/data.json b/packages/dev-tools-pages/ts/components/animations/trace/data.json deleted file mode 100644 index 7b2936fff..000000000 --- a/packages/dev-tools-pages/ts/components/animations/trace/data.json +++ /dev/null @@ -1 +0,0 @@ -{"v":"5.4.1","fr":30,"ip":0,"op":420,"w":4482,"h":1220,"nm":"header-trace","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[2241,610,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[],"ip":0,"op":529,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":3,"nm":"▽ header-trace","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[2242,609,0],"ix":2},"a":{"a":0,"k":[2238,607,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3391.5,737.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[101.75,-11.75],[-11.75,101.75],[-101.75,11.75],[11.75,-101.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Path 7","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[4035.5,479.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[221.75,158.25],[158.25,221.75],[-221.75,-158.25],[-158.25,-221.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[201.75,178.25],[158.25,221.75],[-221.75,-158.25],[-178.25,-201.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[201.75,178.25],[158.25,221.75],[-221.75,-158.25],[-178.25,-201.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[201.75,178.25],[158.25,221.75],[-221.75,-158.25],[-178.25,-201.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[201.75,178.25],[158.25,221.75],[-221.75,-158.25],[-178.25,-201.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[221.75,158.25],[158.25,221.75],[-221.75,-158.25],[-158.25,-221.75]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Path 6","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[4035.5,479.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[221.75,158.25],[158.25,221.75],[-221.75,-158.25],[-158.25,-221.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[211.75,168.25],[158.25,221.75],[-211.75,-148.25],[-158.25,-201.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[211.75,168.25],[158.25,221.75],[-211.75,-148.25],[-158.25,-201.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[211.75,168.25],[158.25,221.75],[-211.75,-148.25],[-158.25,-201.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"n":"0p667_1_0p167_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[211.75,168.25],[158.25,221.75],[-211.75,-148.25],[-158.25,-201.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[221.75,158.25],[158.25,221.75],[-221.75,-158.25],[-158.25,-221.75]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Path 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[4035.5,479.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[221.75,158.25],[158.25,221.75],[-221.75,-158.25],[-158.25,-221.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[221.75,158.25],[158.25,221.75],[-201.75,-138.25],[-138.25,-201.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[221.75,158.25],[158.25,221.75],[-201.75,-138.25],[-138.25,-201.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[221.75,158.25],[158.25,221.75],[-201.75,-138.25],[-138.25,-201.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[221.75,158.25],[158.25,221.75],[-201.75,-138.25],[-138.25,-201.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[221.75,158.25],[158.25,221.75],[-221.75,-158.25],[-158.25,-221.75]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[4031.5,477.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[221.75,158.25],[158.25,221.75],[-221.75,-158.25],[-158.25,-221.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3671.5,517.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[21.75,158.25],[158.25,21.75],[-21.75,-158.25],[-158.25,-21.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"Path Copy 12","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3803.5,646.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[93.75,-43.75],[-43.75,93.75],[-73.75,63.75],[63.75,-73.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[73.75,-63.75],[-63.75,73.75],[-73.75,63.75],[63.75,-73.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":121,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[73.75,-63.75],[-63.75,73.75],[-73.75,63.75],[63.75,-73.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[73.75,-63.75],[-63.75,73.75],[-73.75,63.75],[63.75,-73.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[73.75,-63.75],[-63.75,73.75],[-73.75,63.75],[63.75,-73.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[93.75,-43.75],[-43.75,93.75],[-73.75,63.75],[63.75,-73.75]],"c":true}]},{"t":331}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 12","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"Path Copy 11","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3803.5,666.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[93.75,-53.75],[-43.75,83.75],[-73.75,53.75],[63.75,-83.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[73.75,-53.75],[-53.75,73.75],[-73.75,53.75],[53.75,-73.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":121,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[73.75,-53.75],[-53.75,73.75],[-73.75,53.75],[53.75,-73.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[73.75,-53.75],[-53.75,73.75],[-73.75,53.75],[53.75,-73.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[73.75,-53.75],[-53.75,73.75],[-73.75,53.75],[53.75,-73.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[93.75,-53.75],[-43.75,83.75],[-73.75,53.75],[63.75,-83.75]],"c":true}]},{"t":331}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 11","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":12,"ty":4,"nm":"Path Copy 10","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3803.5,686.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[93.75,-63.75],[-43.75,73.75],[-73.75,43.75],[63.75,-93.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[73.75,-43.75],[-43.75,73.75],[-73.75,43.75],[43.75,-73.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":121,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[73.75,-43.75],[-43.75,73.75],[-73.75,43.75],[43.75,-73.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[73.75,-43.75],[-43.75,73.75],[-73.75,43.75],[43.75,-73.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[73.75,-43.75],[-43.75,73.75],[-73.75,43.75],[43.75,-73.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[93.75,-63.75],[-43.75,73.75],[-73.75,43.75],[63.75,-93.75]],"c":true}]},{"t":331}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 10","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":13,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3101.5,747.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[136.75,-126.75],[-126.75,136.75],[-136.75,126.75],[126.75,-136.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,-106.75],[-106.75,156.75],[-136.75,126.75],[126.75,-136.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":121,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,-106.75],[-106.75,156.75],[-136.75,126.75],[126.75,-136.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,-106.75],[-106.75,156.75],[-136.75,126.75],[126.75,-136.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,-106.75],[-106.75,156.75],[-136.75,126.75],[126.75,-136.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[136.75,-126.75],[-126.75,136.75],[-136.75,126.75],[126.75,-136.75]],"c":true}]},{"t":331}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":14,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3101.5,767.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[136.75,-116.75],[-116.75,136.75],[-136.75,116.75],[116.75,-136.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[146.75,-106.75],[-106.75,146.75],[-136.75,116.75],[116.75,-136.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":121,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[146.75,-106.75],[-106.75,146.75],[-136.75,116.75],[116.75,-136.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[146.75,-106.75],[-106.75,146.75],[-136.75,116.75],[116.75,-136.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[146.75,-106.75],[-106.75,146.75],[-136.75,116.75],[116.75,-136.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[136.75,-116.75],[-116.75,136.75],[-136.75,116.75],[116.75,-136.75]],"c":true}]},{"t":331}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":15,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3101.5,787.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[136.75,-106.75],[-106.75,136.75],[-136.75,106.75],[106.75,-136.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,-126.75],[-106.75,136.75],[-136.75,106.75],[126.75,-156.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":121,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,-126.75],[-106.75,136.75],[-136.75,106.75],[126.75,-156.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,-126.75],[-106.75,136.75],[-136.75,106.75],[126.75,-156.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,-126.75],[-106.75,136.75],[-136.75,106.75],[126.75,-156.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[136.75,-106.75],[-106.75,136.75],[-136.75,106.75],[106.75,-136.75]],"c":true}]},{"t":331}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":16,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3121.5,767.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[146.75,-116.75],[-116.75,146.75],[-146.75,116.75],[116.75,-146.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":17,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[2881.5,567.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.998},"o":{"x":0.167,"y":0.001},"n":"0p833_0p998_0p167_0p001","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[66.75,-16.75],[-16.75,66.75],[-66.75,16.75],[16.75,-66.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[86.75,3.25],[3.25,86.75],[-66.75,16.75],[16.75,-66.75]],"c":true}]},{"i":{"x":0.833,"y":0.998},"o":{"x":0.333,"y":0},"n":"0p833_0p998_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[86.75,3.25],[3.25,86.75],[-66.75,16.75],[16.75,-66.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[86.75,3.25],[3.25,86.75],[-66.75,16.75],[16.75,-66.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[86.75,3.25],[3.25,86.75],[-66.75,16.75],[16.75,-66.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[66.75,-16.75],[-16.75,66.75],[-66.75,16.75],[16.75,-66.75]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":18,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[2911.5,577.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.999},"o":{"x":0.167,"y":0.002},"n":"0p833_0p999_0p167_0p002","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[61.75,-11.75],[-11.75,61.75],[-61.75,11.75],[11.75,-61.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[71.75,-1.75],[-11.75,81.75],[-71.75,21.75],[11.75,-61.75]],"c":true}]},{"i":{"x":0.833,"y":0.999},"o":{"x":0.333,"y":0},"n":"0p833_0p999_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[71.75,-1.75],[-11.75,81.75],[-71.75,21.75],[11.75,-61.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[71.75,-1.75],[-11.75,81.75],[-71.75,21.75],[11.75,-61.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[71.75,-1.75],[-11.75,81.75],[-71.75,21.75],[11.75,-61.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[61.75,-11.75],[-11.75,61.75],[-61.75,11.75],[11.75,-61.75]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":19,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[2941.5,587.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.998},"o":{"x":0.167,"y":0.002},"n":"0p833_0p998_0p167_0p002","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[56.75,-6.75],[-6.75,56.75],[-56.75,6.75],[6.75,-56.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[56.75,-6.75],[-26.75,76.75],[-76.75,26.75],[6.75,-56.75]],"c":true}]},{"i":{"x":0.833,"y":0.998},"o":{"x":0.333,"y":0},"n":"0p833_0p998_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[56.75,-6.75],[-26.75,76.75],[-76.75,26.75],[6.75,-56.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[56.75,-6.75],[-26.75,76.75],[-76.75,26.75],[6.75,-56.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[56.75,-6.75],[-26.75,76.75],[-76.75,26.75],[6.75,-56.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[56.75,-6.75],[-6.75,56.75],[-56.75,6.75],[6.75,-56.75]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":20,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[2901.5,587.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[76.75,-6.75],[-6.75,76.75],[-76.75,6.75],[6.75,-76.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":21,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3411.5,177.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-88.25,-31.75],[-31.75,-88.25],[88.25,31.75],[31.75,88.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":22,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3431.5,157.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-78.25,-41.75],[-41.75,-78.25],[78.25,41.75],[41.75,78.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":23,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3411.5,157.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-78.25,-31.75],[-31.75,-78.25],[78.25,31.75],[31.75,78.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":24,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3391.5,157.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-78.25,-21.75],[-21.75,-78.25],[78.25,21.75],[21.75,78.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":25,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[3101.5,627.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[136.75,-186.75],[-186.75,136.75],[-136.75,186.75],[186.75,-136.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":26,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1444.5,626.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[36.75,63.25],[63.25,36.75],[-36.75,-63.25],[-63.25,-36.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":27,"ty":4,"nm":"Path 4","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[704.5,527.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-183.25,-16.75],[-16.75,-183.25],[183.25,16.75],[16.75,183.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":28,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1064.5,887.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-3.25,163.25],[163.25,-3.25],[3.25,-163.25],[-163.25,3.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":29,"ty":4,"nm":"Path Copy 4","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1594.5,776.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[101.75,-51.75],[-51.75,101.75],[-101.75,51.75],[51.75,-101.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[121.75,-31.75],[-31.75,121.75],[-101.75,51.75],[51.75,-101.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[121.75,-31.75],[-31.75,121.75],[-101.75,51.75],[51.75,-101.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[121.75,-31.75],[-31.75,121.75],[-101.75,51.75],[51.75,-101.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"n":"0p667_1_0p167_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[121.75,-31.75],[-31.75,121.75],[-101.75,51.75],[51.75,-101.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[101.75,-51.75],[-51.75,101.75],[-101.75,51.75],[51.75,-101.75]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 4","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":30,"ty":4,"nm":"Path Copy 3","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1624.5,787.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[96.75,-46.75],[-46.75,96.75],[-96.75,46.75],[46.75,-96.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[106.75,-36.75],[-46.75,116.75],[-116.75,46.75],[36.75,-106.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[106.75,-36.75],[-46.75,116.75],[-116.75,46.75],[36.75,-106.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[106.75,-36.75],[-46.75,116.75],[-116.75,46.75],[36.75,-106.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"n":"0p667_1_0p167_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[106.75,-36.75],[-46.75,116.75],[-116.75,46.75],[36.75,-106.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[96.75,-46.75],[-46.75,96.75],[-96.75,46.75],[46.75,-96.75]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 3","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":31,"ty":4,"nm":"Path Copy 2","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1654.5,797.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91.75,-41.75],[-41.75,91.75],[-91.75,41.75],[41.75,-91.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91.75,-41.75],[-61.75,111.75],[-131.75,41.75],[21.75,-111.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91.75,-41.75],[-61.75,111.75],[-131.75,41.75],[21.75,-111.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91.75,-41.75],[-61.75,111.75],[-131.75,41.75],[21.75,-111.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"n":"0p667_1_0p167_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91.75,-41.75],[-61.75,111.75],[-131.75,41.75],[21.75,-111.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91.75,-41.75],[-41.75,91.75],[-91.75,41.75],[41.75,-91.75]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 2","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":32,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1615.5,796.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[41.75,-111.75],[-111.75,41.75],[-41.75,111.75],[111.75,-41.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":33,"ty":4,"nm":"Path 3","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[704.5,527.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.998},"o":{"x":0.167,"y":0.002},"n":"0p833_0p998_0p167_0p002","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-183.25,-16.75],[-16.75,-183.25],[183.25,16.75],[16.75,183.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-159.25,7.25],[7.25,-159.25],[183.25,16.75],[16.75,183.25]],"c":true}]},{"i":{"x":0.713,"y":0.984},"o":{"x":0.333,"y":0},"n":"0p713_0p984_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-159.25,7.25],[7.25,-159.25],[183.25,16.75],[16.75,183.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-159.25,7.25],[7.25,-159.25],[183.25,16.75],[16.75,183.25]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-159.25,7.25],[7.25,-159.25],[183.25,16.75],[16.75,183.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-183.25,-16.75],[-16.75,-183.25],[183.25,16.75],[16.75,183.25]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":34,"ty":4,"nm":"Path 2","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[702.5,527.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.996},"o":{"x":0.167,"y":0.002},"n":"0p833_0p996_0p167_0p002","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-183.25,-16.75],[-16.75,-183.25],[183.25,16.75],[16.75,183.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-169.25,-4.75],[-14.75,-159.25],[171.25,26.75],[16.75,183.25]],"c":true}]},{"i":{"x":0.689,"y":0.993},"o":{"x":0.333,"y":0},"n":"0p689_0p993_0p333_0","t":211,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-169.25,-4.75],[-14.75,-159.25],[171.25,26.75],[16.75,183.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-169.25,-4.75],[-14.75,-159.25],[171.25,26.75],[16.75,183.25]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-169.25,-4.75],[-14.75,-159.25],[171.25,26.75],[16.75,183.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-183.25,-16.75],[-16.75,-183.25],[183.25,16.75],[16.75,183.25]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":35,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[704.5,527.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.994},"o":{"x":0.167,"y":0.003},"n":"0p833_0p994_0p167_0p003","t":180,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-183.25,-16.75],[-16.75,-183.25],[183.25,16.75],[16.75,183.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-183.25,-16.75],[-40.75,-159.25],[159.25,40.75],[16.75,183.25]],"c":true}]},{"i":{"x":0.682,"y":0.993},"o":{"x":0.333,"y":0},"n":"0p682_0p993_0p333_0","t":210,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-183.25,-16.75],[-40.75,-159.25],[159.25,40.75],[16.75,183.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-183.25,-16.75],[-40.75,-159.25],[159.25,40.75],[16.75,183.25]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":390,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-183.25,-16.75],[-40.75,-159.25],[159.25,40.75],[16.75,183.25]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-183.25,-16.75],[-16.75,-183.25],[183.25,16.75],[16.75,183.25]],"c":true}]},{"t":420}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":36,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1205.5,527.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,113.25],[113.25,156.75],[-156.75,-113.25],[-113.25,-156.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,113.25],[93.25,176.75],[-176.75,-93.25],[-113.25,-156.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":121,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,113.25],[93.25,176.75],[-176.75,-93.25],[-113.25,-156.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,113.25],[93.25,176.75],[-176.75,-93.25],[-113.25,-156.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,113.25],[93.25,176.75],[-176.75,-93.25],[-113.25,-156.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,113.25],[113.25,156.75],[-156.75,-113.25],[-113.25,-156.75]],"c":true}]},{"t":331}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":37,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1205.5,547.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,103.25],[103.25,156.75],[-156.75,-103.25],[-103.25,-156.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,103.25],[93.25,166.75],[-176.75,-103.25],[-113.25,-166.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":121,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,103.25],[93.25,166.75],[-176.75,-103.25],[-113.25,-166.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,103.25],[93.25,166.75],[-176.75,-103.25],[-113.25,-166.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,103.25],[93.25,166.75],[-176.75,-103.25],[-113.25,-166.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,103.25],[103.25,156.75],[-156.75,-103.25],[-103.25,-156.75]],"c":true}]},{"t":331}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":38,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1205.5,567.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,93.25],[93.25,156.75],[-156.75,-93.25],[-93.25,-156.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,93.25],[93.25,156.75],[-176.75,-113.25],[-113.25,-176.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":121,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,93.25],[93.25,156.75],[-176.75,-113.25],[-113.25,-176.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,93.25],[93.25,156.75],[-176.75,-113.25],[-113.25,-176.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,93.25],[93.25,156.75],[-176.75,-113.25],[-113.25,-176.75]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[156.75,93.25],[93.25,156.75],[-156.75,-93.25],[-93.25,-156.75]],"c":true}]},{"t":331}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":39,"ty":4,"nm":"Path Copy 16","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[549.878,808.122,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,-100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,65.119],[41.119,140.059],[-140.061,-41.121],[-65.121,-116.061]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,65.119],[65.119,116.059],[-116.061,-65.121],[-65.121,-116.061]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":122,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,65.119],[65.119,116.059],[-116.061,-65.121],[-65.121,-116.061]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,65.119],[65.119,116.059],[-116.061,-65.121],[-65.121,-116.061]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,65.119],[65.119,116.059],[-116.061,-65.121],[-65.121,-116.061]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,65.119],[41.119,140.059],[-140.061,-41.121],[-65.121,-116.061]],"c":true}]},{"t":331}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":-270,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 16","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":40,"ty":4,"nm":"Path Copy 15","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[526,808.122,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,-100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,53.409],[41.409,128.059],[-140.061,-53.411],[-65.411,-128.061]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,53.409],[53.409,116.059],[-116.061,-53.411],[-53.411,-116.061]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":122,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,53.409],[53.409,116.059],[-116.061,-53.411],[-53.411,-116.061]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,53.409],[53.409,116.059],[-116.061,-53.411],[-53.411,-116.061]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,53.409],[53.409,116.059],[-116.061,-53.411],[-53.411,-116.061]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,53.409],[41.409,128.059],[-140.061,-53.411],[-65.411,-128.061]],"c":true}]},{"t":331}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":-270,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 15","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":41,"ty":4,"nm":"Path Copy 14","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[503.425,808.122,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,-100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":90,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,42.045],[41.699,116.405],[-138.061,-64.045],[-63.701,-138.405]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,42.045],[41.699,116.405],[-116.061,-42.045],[-41.701,-116.405]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":122,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,42.045],[41.699,116.405],[-116.061,-42.045],[-41.701,-116.405]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,42.045],[41.699,116.405],[-116.061,-42.045],[-41.701,-116.405]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":300,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,42.045],[41.699,116.405],[-116.061,-42.045],[-41.701,-116.405]],"c":true}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[116.059,42.045],[41.699,116.405],[-138.061,-64.045],[-63.701,-138.405]],"c":true}]},{"t":331}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":-270,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 14","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":42,"ty":4,"nm":"Path Copy 13","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[391,697,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,-100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[195.5,121.05],[121.05,195.5],[-195.5,-121.05],[-121.05,-195.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":-270,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path Copy 13","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":43,"ty":4,"nm":"Path","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1185.5,548.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[166.75,103.25],[103.25,166.75],[-166.75,-103.25],[-103.25,-166.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.30980399251,0.462745010853,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[200,200],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0}],"markers":[{"tm":90,"cm":"1","dr":0},{"tm":121,"cm":"2","dr":0},{"tm":180,"cm":"3","dr":0},{"tm":210,"cm":"4","dr":0},{"tm":300,"cm":"5","dr":0},{"tm":331,"cm":"6","dr":0},{"tm":390,"cm":"7","dr":0},{"tm":420,"cm":"8","dr":0}]} \ No newline at end of file diff --git a/packages/dev-tools-pages/ts/components/animations/trace/index.tsx b/packages/dev-tools-pages/ts/components/animations/trace/index.tsx deleted file mode 100644 index 2009c3cec..000000000 --- a/packages/dev-tools-pages/ts/components/animations/trace/index.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import * as React from 'react'; - -import { BaseAnimation } from '../index'; - -import * as animationData from './data.json'; - -const TraceAnimation: React.StatelessComponent<{}> = () => ( - -); - -export { TraceAnimation }; diff --git a/packages/dev-tools-pages/ts/components/base.tsx b/packages/dev-tools-pages/ts/components/base.tsx deleted file mode 100644 index 4eb4e3ae3..000000000 --- a/packages/dev-tools-pages/ts/components/base.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import * as React from 'react'; -import { ThemeProvider } from 'styled-components'; - -import { Footer } from 'ts/components/footer'; -import { Header } from 'ts/components/header'; -import { ThemeContext } from 'ts/context'; -import { GlobalStyles } from 'ts/globalStyles'; - -interface BaseProps { - context: any; -} - -const Base: React.StatelessComponent = props => ( - - - - -
- {props.children} -